fix: control-centre formatting and small-player
This commit is contained in:
1 parent
f1d53b7e1e
commit
8e1f0de0b8
4 files changed
+64
-40
No files matched your search
@@ -152,8 +152,9 @@ class ModusControlCenter(Window):
|
||||
orientation="vertical",
|
||||
children=[
|
||||
Label(
|
||||
name="bluetooth-widget-name",
|
||||
label="Bluetooth",
|
||||
style_classes="title ct",
|
||||
style_classes="ct",
|
||||
h_align="start",
|
||||
),
|
||||
self.bluetooth_label,
|
||||
@@ -175,7 +176,10 @@ class ModusControlCenter(Window):
|
||||
orientation="vertical",
|
||||
children=[
|
||||
Label(
|
||||
label="Wi-Fi", style_classes="title ct", h_align="start"
|
||||
name="wifi-widget-name",
|
||||
label="Wi-Fi",
|
||||
style_classes="ct",
|
||||
h_align="start",
|
||||
),
|
||||
self.wlan_label,
|
||||
],
|
||||
|
||||
@@ -445,7 +445,7 @@ class PlayerBox(Box):
|
||||
|
||||
self.track_artist = Label(
|
||||
label="No Artist",
|
||||
name="player-artist",
|
||||
name="player-artist-c",
|
||||
justification="left",
|
||||
max_chars_width=15,
|
||||
ellipsization="end",
|
||||
@@ -501,7 +501,7 @@ class PlayerBox(Box):
|
||||
children=[
|
||||
self.track_title,
|
||||
self.track_artist,
|
||||
self.track_album,
|
||||
# self.track_album,
|
||||
],
|
||||
)
|
||||
|
||||
@@ -514,10 +514,10 @@ class PlayerBox(Box):
|
||||
spacing=2,
|
||||
)
|
||||
|
||||
self.skip_next_icon = Image(icon_name="media-skip-forward")
|
||||
self.skip_next_icon = Image(icon_name="player_fwd")
|
||||
self.skip_prev_icon = Image(icon_name="media-skip-backward")
|
||||
self.shuffle_icon = Image(icon_name="shuffle")
|
||||
self.play_pause_icon = Image(icon_name="media-playback-start")
|
||||
self.play_pause_icon = Image(icon_name="player_pause")
|
||||
|
||||
self.play_pause_button = Button(
|
||||
name="player-button",
|
||||
@@ -740,14 +740,28 @@ class PlayerBox(Box):
|
||||
self.shuffle_icon.style_classes = []
|
||||
self.shuffle_icon.add_style_class("shuffle-off")
|
||||
|
||||
def play_pause(self, player, status):
|
||||
status = player.get_property("playback-status")
|
||||
|
||||
if status == "paused":
|
||||
self.play_pause_icon.set_from_icon_name("player_play")
|
||||
|
||||
if status == "playing":
|
||||
self.play_pause_icon.set_from_icon_name("player_pause")
|
||||
# Notify the player stack that this player started playing
|
||||
if self.player_stack and hasattr(
|
||||
self.player_stack, "on_player_playback_changed"
|
||||
):
|
||||
self.player_stack.on_player_playback_changed(self, status)
|
||||
|
||||
def _on_playback_change(self, player, status):
|
||||
status = player.get_property("playback-status")
|
||||
|
||||
if status == "paused":
|
||||
self.play_pause_icon.set_from_icon_name("media-playbook-start")
|
||||
self.play_pause_icon.set_from_icon_name("player_play")
|
||||
|
||||
if status == "playing":
|
||||
self.play_pause_icon.set_from_icon_name("media-playback-pause")
|
||||
self.play_pause_icon.set_from_icon_name("player_pause")
|
||||
# Notify the player stack that this player started playing
|
||||
if self.player_stack and hasattr(
|
||||
self.player_stack, "on_player_playback_changed"
|
||||
|
||||
+16
-18
@@ -11,7 +11,7 @@
|
||||
background-color: alpha(#fff, 0.09);
|
||||
border: 1px solid alpha(#111, 0.3);
|
||||
box-shadow: inset 0 0 200px 0 alpha(#111, 0.3);
|
||||
border-radius: 16px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
#control-center-widgets {
|
||||
@@ -36,10 +36,10 @@
|
||||
|
||||
#bluetooth-widget-label,
|
||||
#wifi-widget-label {
|
||||
font-size: 10px;
|
||||
font-size: 12px;
|
||||
margin-left: 5px;
|
||||
/* font-weight: 400; */
|
||||
color: #aaa;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* WiFi Password Dialog */
|
||||
@@ -245,10 +245,11 @@
|
||||
|
||||
.menu {
|
||||
margin: 5px;
|
||||
background-color: alpha(#000, 0.3);
|
||||
border: 0.5px solid alpha(#888, 0.4);
|
||||
box-shadow: inset 0 0 200px 0 alpha(#111, 0.3);
|
||||
border-radius: 12px;
|
||||
/* background-color: alpha(#000, 0.3); */
|
||||
background-color: alpha(#999, 0.1);
|
||||
/* box-shadow: inset 0 0 200px 0 alpha(#111, 0.3); */
|
||||
border: 0.5px solid alpha(#000, 0.4);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
@@ -258,6 +259,13 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#bluetooth-widget-name,
|
||||
#wifi-widget-name {
|
||||
margin-top: 6px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ct {
|
||||
margin-left: 5px;
|
||||
}
|
||||
@@ -312,13 +320,3 @@
|
||||
background-image: none;
|
||||
color: alpha(#fff, 0.2);
|
||||
}
|
||||
#thing {
|
||||
background-color: alpha(#999, 0.9);
|
||||
min-height: 200px;
|
||||
min-width: 600px;
|
||||
}
|
||||
#thing-label {
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
+22
-14
@@ -6,7 +6,9 @@
|
||||
}
|
||||
|
||||
#button-box-c {
|
||||
margin-left: -10px;
|
||||
/* margin-left: -10px; */
|
||||
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
#player-stack-button:hover {
|
||||
@@ -29,9 +31,9 @@
|
||||
}
|
||||
|
||||
#outer-player-box-c {
|
||||
min-height: 60px;
|
||||
min-height: 70px;
|
||||
min-width: 263px;
|
||||
border-radius: 10px;
|
||||
border-radius: 8px;
|
||||
/* margin: 0 6px; */
|
||||
/* background-color: alpha(#000, 0.3); */
|
||||
/* box-shadow: inset 0 0 0 1px alpha(#aaa, 0.4); */
|
||||
@@ -39,9 +41,10 @@
|
||||
#box-c {
|
||||
min-height: 60px;
|
||||
min-width: 263px;
|
||||
border-radius: 10px;
|
||||
margin: 0 6px;
|
||||
background-color: alpha(#000, 0.3);
|
||||
border-radius: 8px;
|
||||
margin: 0 6px 10px;
|
||||
border: 0.5px solid alpha(#000, 0.4);
|
||||
background-color: alpha(#999, 0.1);
|
||||
/* box-shadow: inset 0 0 0 1px alpha(#aaa, 0.4); */
|
||||
}
|
||||
#player-box:disabled highlight,
|
||||
@@ -59,8 +62,8 @@
|
||||
|
||||
#player-title-c {
|
||||
/* margin-top: 18px; */
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
#player-title {
|
||||
margin-top: 18px;
|
||||
@@ -68,9 +71,14 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
#player-app-icon {
|
||||
margin-bottom: 4px;
|
||||
/* margin-bottom: 2px; */
|
||||
}
|
||||
|
||||
#player-artist-c {
|
||||
margin-top: -5px;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
#player-artist,
|
||||
#player-album {
|
||||
font-weight: 500;
|
||||
@@ -102,12 +110,12 @@
|
||||
}
|
||||
|
||||
.album-image-c {
|
||||
min-width: 55px;
|
||||
min-height: 55px;
|
||||
min-width: 50px;
|
||||
min-height: 50px;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
/* margin-left: 12px; */
|
||||
border-radius: 10px;
|
||||
margin-left: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.album-image {
|
||||
min-width: 100px;
|
||||
@@ -115,5 +123,5 @@
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
margin-left: 12px;
|
||||
border-radius: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
Reference in new issue
Block a user