Skip to content

Commit aa35941

Browse files
soreauammen99
authored andcommitted
window-list: Allow smaller panel heights (#214)
Set the scrolled window policy to NEVER instead of AUTOMATIC to allow it to become smaller than 32 pixels in height.
1 parent d39b7fd commit aa35941

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/panel/widgets/window-list/toplevel.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,10 @@ class WayfireToplevel::impl
298298

299299
void set_app_id(std::string app_id)
300300
{
301+
WfOption<int> minimal_panel_height{"panel/minimal_height"};
301302
this->app_id = app_id;
302303
IconProvider::set_image_from_icon(image, app_id,
303-
24, button.get_scale_factor());
304+
std::min(int(minimal_panel_height), 24), button.get_scale_factor());
304305
}
305306

306307
void send_rectangle_hint()
@@ -734,7 +735,7 @@ void set_image_from_icon(Gtk::Image& image,
734735
{
735736
/* Perhaps no desktop app info, but we might still be able to
736737
* get an icon directly from the icon theme */
737-
if (Gtk::IconTheme::get_default()->lookup_icon(app_id, 24))
738+
if (Gtk::IconTheme::get_default()->lookup_icon(app_id, size))
738739
{
739740
icon_name = app_id;
740741
}

src/panel/widgets/window-list/window-list.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ void WayfireWindowList::init(Gtk::HBox *container)
195195
box.set_homogeneous(true);
196196
scrolled_window.add(box);
197197
scrolled_window.set_propagate_natural_width(true);
198+
scrolled_window.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_NEVER);
198199
container->pack_start(scrolled_window, true, true);
199200
scrolled_window.show_all();
200201
}

0 commit comments

Comments
 (0)