Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions data/styles/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,24 @@ panel.translucent.color-light > box {
0 1px 1px alpha(black, 0.05);
}

indicator > revealer {
border-radius: 0.25rem;
margin: 0.25rem;
padding: 0 0.5rem;
transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

indicator:checked > revealer {
background: alpha(@highlight_color, 0.6);
}

panel.maximized indicator:checked > revealer {
background: alpha(white, 0.3);
}

.composited-indicator {
color: white;
font-weight: bold;
padding: 0 6px;
text-shadow:
0 0 2px alpha(black, 0.3),
0 1px 2px alpha(black, 0.6);
Expand All @@ -57,17 +71,6 @@ panel.translucent.color-light > box {
warning mix(@BANANA_300, @BANANA_500, 0.5);
}

/*FIXME: Replace with border-spacing in GTK4*/
.composited-indicator image + label,
.composited-indicator image + revealer {
padding-left: 0.5em;
}

.composited-indicator:dir(rtl) image + label,
.composited-indicator:dir(rtl) image + revealer {
padding-right: 0.5em;
}

.color-light .composited-indicator {
color: alpha(black, 0.65);
text-shadow:
Expand Down
5 changes: 5 additions & 0 deletions src/Services/PopoverManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ public class Wingpanel.Services.PopoverManager : Object {
} else if (value == null && _current_indicator != null) { // Close requested
indicator_open = false;
_current_indicator.base_indicator.closed ();
_current_indicator.set_state_flags (NORMAL, true);
_current_indicator = null;
} else if (_current_indicator.base_indicator.code_name == value.base_indicator.code_name) { // Close due to toggle
_current_indicator.set_state_flags (NORMAL, true);
_current_indicator.base_indicator.closed ();
_current_indicator = null;
} else { // Switch
_current_indicator.set_state_flags (NORMAL, true);
update_has_tooltip (_current_indicator.display_widget);
_current_indicator.base_indicator.closed ();
_current_indicator = value;
Expand All @@ -55,6 +58,7 @@ public class Wingpanel.Services.PopoverManager : Object {
update_has_tooltip (_current_indicator.display_widget, false);
popover.set_parent (_current_indicator);
popover.popup ();
_current_indicator.set_state_flags (CHECKED, true);
_current_indicator.base_indicator.opened ();
} else {
update_has_tooltip (((Wingpanel.Widgets.IndicatorEntry)popover.parent).display_widget);
Expand All @@ -72,6 +76,7 @@ public class Wingpanel.Services.PopoverManager : Object {
popover.add_css_class ("indicator");

popover.closed.connect (() => {
_current_indicator.set_state_flags (NORMAL, true);
current_indicator = null;
popover.unparent ();
});
Expand Down
4 changes: 4 additions & 0 deletions src/Widgets/IndicatorEntry.vala
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public class Wingpanel.Widgets.IndicatorEntry : Granite.Bin {
indicator_order[Indicator.SESSION] = 14;
}

class construct {
set_css_name ("indicator");
}

construct {
display_widget = base_indicator.get_display_widget ();
halign = Gtk.Align.START;
Expand Down
Loading