Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f032f82
panel: use less menubuttons
trigg Mar 21, 2026
6168371
chore: rename WayfireMenuButton to WayfireMenuWidget and popover to p…
trigg Mar 21, 2026
60bd34f
panel: fix up clock, workspace and notification popups
trigg Mar 22, 2026
c7c5c41
panel: move force-over-fullscreen up to autohide logic
trigg Mar 22, 2026
9a011e7
panel: show when menuwidget is selected
trigg Apr 25, 2026
06f5849
chore: fix up broken merge
trigg May 2, 2026
caee0de
panel: reimplement #105 which got undone by accident
trigg May 9, 2026
92db637
panel: assume popovers are not focus stealing unless required
trigg May 10, 2026
f83c015
panel: remove button from battery widget
trigg May 10, 2026
ba6099d
panel: remove button from language widget
trigg May 10, 2026
2b8f99f
panel: remove css rules to make specific buttons not look like buttons
trigg May 10, 2026
ad1c8dd
panel: remove superfluous flat classes
trigg May 10, 2026
b1a884d
panel: fix multiple popups from volume and mixer. Thanks @soreau
trigg May 16, 2026
37f0ffd
panel: fix mixer instantly popping up again on dismiss
trigg May 16, 2026
43564f1
panel: mixer brought inline with changes to menuwidget
trigg May 17, 2026
8781000
panel: fix menu focus grab on popup
trigg May 17, 2026
7ac596b
panel: fix warning in clock
trigg May 17, 2026
043da60
panel: attempt at fixing volume resize issue
trigg May 17, 2026
bf44bb4
util : wf-popover : fix getting child of popover
AKArien May 17, 2026
4c3d83c
panel : mixer : fix gestures
AKArien May 17, 2026
466ea6a
clean up headers
AKArien May 17, 2026
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
40 changes: 24 additions & 16 deletions data/css/default.css
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
.wf-panel .launcher,
.wf-panel .launcher:hover,
.wf-panel .tray-button,
.wf-panel .tray-button:hover {
background: unset;
border: unset;
box-shadow: unset;
padding-left: unset;
padding-right: unset;
}

.wf-panel .tray-button image,
.wf-panel .launcher image {
.wf-panel image.launcher{
transition: 500ms linear;
-gtk-icon-transform: scale(0.8);
}

.wf-panel .launcher:hover image,
.wf-panel image.launcher:hover,
.wf-panel .tray-button:hover image {
transition: 500ms linear;
-gtk-icon-transform: scale(1.2);
-gtk-icon-transform: scale(1.0);
}

/* FIXME: Makes a bad assumption about LTR reading direction. */
.wf-panel .battery label,
.wf-panel .battery:hover label,
.wf-panel .window-button label,
.wf-panel .window-button image,
.wf-panel .window-button:hover label,
.wf-panel .tray-button,
.wf-panel .tray-button:hover,
.wf-panel .notification button {
padding-left: 5px;
}

.wf-panel .window-button.activated {
background-color: #8883;
}

.wf-panel .window-button:hover {
background-color: #8882;
}

.wf-panel .battery overlay label {
--bcol: rgb(from currentcolor calc(255 - r) calc(255 - g) calc(255 - b) );
text-shadow: 1px 1px 0 var(--bcol),
Expand Down Expand Up @@ -90,11 +89,11 @@ text-shadow: 1px 1px 0 var(--bcol),
min-width: 48px;
}

.wf-panel .language label {
.wf-panel label.language {
background-color: #24283B;
padding: 5px;
margin: 5px;
border-radius: 3px;
border-radius: 3px;
color: #41A6B5;
}

Expand Down Expand Up @@ -132,6 +131,15 @@ text-shadow: 1px 1px 0 var(--bcol),
background-color: #00FFAA77;
border: 1px solid #222;
}

.wf-panel .wf-menu.selected {
background-color:#8883;
}

.wf-panel .wf-menu:hover {
background-color: #8882;
}

.excellent>label {
color: #00ff00;
}
Expand Down
8 changes: 4 additions & 4 deletions data/css/panel-window-list-zoom-hover.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/* Default size not-selected not-hovered */
.wf-panel .window-button.flat image {
.wf-panel .window-button image {
transition: 500ms linear;
-gtk-icon-transform: scale(1.0);
}

/* Double size not-selected hovered */
.wf-panel .window-button.flat:hover image {
.wf-panel .window-button:hover image {
transition: 100ms linear;
-gtk-icon-transform: scale(2.0);
}

/* +50% size selected not-hovered */
.wf-panel .window-button image {
.wf-panel .window-button.activated image {
transition: 100ms linear;
-gtk-icon-transform: scale(1.5);
}

/* Double size selected hovered */
.wf-panel .window-button:hover image {
.wf-panel .window-button.activated:hover image {
transition: 100ms linear;
-gtk-icon-transform: scale(2.0);
}
20 changes: 14 additions & 6 deletions metadata/panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ If full_span is off, both sides of the panel will take the same amount of space,
<_name>Background</_name>
</desc>
</option>
<option name="force_show_popup" type="bool">
<_short>Force showing the popups</_short>
<_long>Show the popup over other windows, even if it and the panel would be hidden otherwise.</_long>
<default>true</default>
</option>
<option name="menus_change_motion" type="bool">
<_short>Change between open menu with mouse motion</_short>
<default>false</default>
</option>
<option name="background_color" type="string">
<_short>Background Color</_short>
<default>gtk_headerbar</default>
Expand Down Expand Up @@ -264,11 +273,6 @@ If full_span is off, both sides of the panel will take the same amount of space,
<default>8</default>
<min>0</min>
</option>
<option name="menu_force_show_popup" type="bool">
<_short>Force showing the menu popup</_short>
<_long>Show the menu popup over other windows, even if it and the panel would be hidden otherwise.</_long>
<default>true</default>
</option>
<option name="menu_min_category_width" type="int">
<_short>Menu Minimum Category Width</_short>
<default>200</default>
Expand Down Expand Up @@ -368,7 +372,7 @@ If full_span is off, both sides of the panel will take the same amount of space,
<option name="mixer_popup_timeout" type="double">
<_short>Popup timeout</_short>
<default>2.5</default>
<min>0</min>
<min>0.1</min>
</option>
<option name="mixer_slider_length" type="int">
<_short>Slider length</_short>
Expand Down Expand Up @@ -411,6 +415,10 @@ If full_span is off, both sides of the panel will take the same amount of space,
<value>show_quick_target</value>
<_name>Show quick action target</_name>
</desc>
<desc>
<value>mute_quick_target</value>
<_name>Mute quick action target</_name>
</desc>
</option>
<option name="mixer_middle_click_action" type="string">
<_short>Middle click action</_short>
Expand Down
2 changes: 1 addition & 1 deletion src/background/background.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void WayfireBackground::setup_window()
gtk_layer_set_anchor(gobj(), GTK_LAYER_SHELL_EDGE_BOTTOM, true);
gtk_layer_set_anchor(gobj(), GTK_LAYER_SHELL_EDGE_LEFT, true);
gtk_layer_set_anchor(gobj(), GTK_LAYER_SHELL_EDGE_RIGHT, true);
gtk_layer_set_keyboard_mode(gobj(), GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND);
gtk_layer_set_keyboard_mode(gobj(), GTK_LAYER_SHELL_KEYBOARD_MODE_NONE);

gtk_layer_set_exclusive_zone(gobj(), -1);

Expand Down
3 changes: 2 additions & 1 deletion src/dock/dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "network/manager.hpp"
#include "network/network-widget.hpp"
#include "network/network.hpp"
#include "wf-popover.hpp"
#include <css-config.hpp>


Expand All @@ -23,7 +24,7 @@ class WfDock::impl
std::unique_ptr<WayfireAutohidingWindow> window;
wl_surface *_wl_surface;
Gtk::FlowBox box;
std::unique_ptr<WayfireMenuButton> network_image;
std::unique_ptr<WayfireMenuWidget> network_image;
std::unique_ptr<NetworkControlWidget> network_control;
std::shared_ptr<NetworkManager> network_manager;

Expand Down
1 change: 0 additions & 1 deletion src/locker/plugin/volume.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once
#include <memory>
#include <gtkmm/button.h>
#include <gtkmm/popover.h>
#include <gtkmm/scale.h>
#include <pulse/pulseaudio.h>

Expand Down
22 changes: 12 additions & 10 deletions src/panel/panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,20 @@ class WayfirePanel::impl

left_box.set_halign(Gtk::Align::END);
right_box.set_halign(Gtk::Align::START);
left_box.set_valign(Gtk::Align::CENTER);
right_box.set_valign(Gtk::Align::CENTER);
center_box.set_halign(Gtk::Align::CENTER);
left_box.set_valign(Gtk::Align::FILL);
right_box.set_valign(Gtk::Align::FILL);
center_box.set_valign(Gtk::Align::FILL);
} else
{
content_box.set_size_request(-1, (std::max(lnat, rnat) * 2) + mnat);

left_box.set_halign(Gtk::Align::CENTER);
right_box.set_halign(Gtk::Align::CENTER);
left_box.set_halign(Gtk::Align::FILL);
right_box.set_halign(Gtk::Align::FILL);
center_box.set_halign(Gtk::Align::FILL);
left_box.set_valign(Gtk::Align::END);
right_box.set_valign(Gtk::Align::START);
center_box.set_valign(Gtk::Align::CENTER);
}
} else
{
Expand All @@ -133,14 +137,14 @@ class WayfirePanel::impl
{
left_box.set_halign(Gtk::Align::START);
right_box.set_halign(Gtk::Align::END);
left_box.set_valign(Gtk::Align::CENTER);
right_box.set_valign(Gtk::Align::CENTER);
left_box.set_valign(Gtk::Align::FILL);
right_box.set_valign(Gtk::Align::FILL);
} else
{
left_box.set_valign(Gtk::Align::START);
right_box.set_valign(Gtk::Align::END);
left_box.set_halign(Gtk::Align::CENTER);
right_box.set_halign(Gtk::Align::CENTER);
left_box.set_halign(Gtk::Align::FILL);
right_box.set_halign(Gtk::Align::FILL);
}
}
}
Expand Down Expand Up @@ -173,8 +177,6 @@ class WayfirePanel::impl

content_box.set_hexpand(true);
content_box.set_vexpand(true);
center_box.set_halign(Gtk::Align::CENTER);
center_box.set_valign(Gtk::Align::CENTER);

window->set_child(content_box);
}
Expand Down
26 changes: 12 additions & 14 deletions src/panel/widgets/battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ void WayfireBatteryInfo::update_details()
description += ", " + uint_to_time(time_to_empty.get()) + " remaining";
}

button.set_tooltip_text(
box.set_tooltip_text(
get_device_type_description(type.get()) + description);

if (status_opt.value() == BATTERY_STATUS_PERCENT)
{
label.set_text(percentage_string);
overlay.remove_overlay(label);
button_box.append(label);
box.append(label);
} else if (status_opt.value() == BATTERY_STATUS_FULL)
{
label.set_text(description);
Expand All @@ -156,14 +156,14 @@ void WayfireBatteryInfo::update_details()
overlay.remove_overlay(label);
}

button_box.append(label);
box.append(label);
} else if (status_opt.value() == BATTERY_STATUS_OVERLAY)
{
label.set_text(percentage_string);
auto children = button_box.get_children();
auto children = box.get_children();
if (std::count(children.begin(), children.end(), &label))
{
button_box.remove(label);
box.remove(label);
}

overlay.add_overlay(label);
Expand Down Expand Up @@ -231,10 +231,10 @@ void WayfireBatteryInfo::update_layout()

if (panel_position.value() == PANEL_POSITION_LEFT or panel_position.value() == PANEL_POSITION_RIGHT)
{
button_box.set_orientation(Gtk::Orientation::VERTICAL);
box.set_orientation(Gtk::Orientation::VERTICAL);
} else
{
button_box.set_orientation(Gtk::Orientation::HORIZONTAL);
box.set_orientation(Gtk::Orientation::HORIZONTAL);
}
}

Expand All @@ -252,22 +252,20 @@ void WayfireBatteryInfo::init(Gtk::Box *container)
return;
}

button_box.append(overlay);
box.append(overlay);
overlay.set_child(icon);
icon.add_css_class("widget-icon");
button.add_css_class("battery");
button.add_css_class("flat");
box.add_css_class("battery");

status_opt.set_callback([=] () { update_details(); });

update_details();
update_icon();

container->append(button);
button_box.set_spacing(5);
container->append(box);
box.set_spacing(5);

button.set_child(button_box);
button.property_scale_factor().signal_changed()
icon.property_scale_factor().signal_changed()
.connect(sigc::mem_fun(*this, &WayfireBatteryInfo::update_icon));

update_layout();
Expand Down
3 changes: 1 addition & 2 deletions src/panel/widgets/battery.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ class WayfireBatteryInfo : public WayfireWidget

sigc::connection btn_sig, disp_dev_sig;

Gtk::Button button;
Gtk::Label label;
Gtk::Box button_box;
Gtk::Box box;
Gtk::Overlay overlay;

Gtk::Image icon;
Expand Down
14 changes: 6 additions & 8 deletions src/panel/widgets/clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@

void WayfireClock::init(Gtk::Box *container)
{
button = std::make_unique<WayfireMenuButton>("panel");
button = std::make_unique<WayfireMenuWidget>("panel", "clock");
button->add_css_class("clock");
button->set_child(label);
button->show();
button->append(label);
button->open_on(1);
label.set_justify(Gtk::Justification::CENTER);
label.show();

update_label();

calendar.show();
button->get_popover()->add_css_class("clock-popover");
button->get_children()[0]->add_css_class("flat");
button->get_popover()->set_child(calendar);
btn_sig = button->get_popover()->signal_show().connect(
button->set_popup_child(calendar);
btn_sig = button->signal_popup().connect(
sigc::mem_fun(*this, &WayfireClock::on_calendar_shown));

container->append(*button);
Expand Down Expand Up @@ -45,7 +43,7 @@ bool WayfireClock::update_label()
* This could be circumvented with the modifiers the user passes to the
* format string, * but to remove the requirement that the user does
* something fancy, we just remove any leading spaces. */
int i = 0;
size_t i = 0;
while (i < text.length() && text[i] == ' ')
{
i++;
Expand Down
2 changes: 1 addition & 1 deletion src/panel/widgets/clock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class WayfireClock : public WayfireWidget
{
Gtk::Label label;
Gtk::Calendar calendar;
std::unique_ptr<WayfireMenuButton> button;
std::unique_ptr<WayfireMenuWidget> button;

sigc::connection timeout, btn_sig;
WfOption<std::string> format{"panel/clock_format"};
Expand Down
Loading
Loading