diff --git a/metadata/pixdecor.xml b/metadata/pixdecor.xml index 311ee56..113a0a3 100644 --- a/metadata/pixdecor.xml +++ b/metadata/pixdecor.xml @@ -196,6 +196,11 @@ <_long>Color of the minimize, maximize and close buttons. 0.0 0.0 0.0 1.0 + + <_short>Button Size + <_long>Changes the button size + 1.0 + <_short>Button Line Thickness <_long>The thickness used to draw the minimize, maximize and close button lines. diff --git a/src/deco-layout.cpp b/src/deco-layout.cpp index ef68675..e8f5827 100644 --- a/src/deco-layout.cpp +++ b/src/deco-layout.cpp @@ -84,6 +84,7 @@ wf::geometry_t pixdecor_layout_t::create_left_buttons(int width, int radius) wf::option_wrapper_t button_spacing{"pixdecor/left_button_spacing"}; wf::option_wrapper_t button_x_offset{"pixdecor/left_button_x_offset"}; wf::option_wrapper_t button_y_offset{"pixdecor/button_y_offset"}; + wf::option_wrapper_t button_size{"pixdecor/button_size"}; GSettings *settings = g_settings_new("org.gnome.desktop.wm.preferences"); gchar *b_layout = g_settings_get_string(settings, "button-layout"); gchar *ptr = b_layout; @@ -139,8 +140,8 @@ wf::geometry_t pixdecor_layout_t::create_left_buttons(int width, int radius) { auto button_area = std::make_unique(button_geometry, damage_callback, theme); auto surface_size = button_area->as_button().set_button_type(type); - button_geometry.width = surface_size.width; - button_geometry.height = surface_size.height; + button_geometry.width = surface_size.width * button_size; + button_geometry.height = surface_size.height * button_size; int button_padding = (theme.get_title_height() - button_geometry.height) / 2 + button_y_offset; button_geometry.y = button_padding + border / 2 + (radius * 2); per_button = button_geometry.width + (buttons.back() == type ? 0 : button_spacing); diff --git a/src/decoration.cpp b/src/decoration.cpp index e1a11b0..80a5d4e 100644 --- a/src/decoration.cpp +++ b/src/decoration.cpp @@ -60,6 +60,7 @@ class wayfire_pixdecor : public wf::plugin_interface_t wf::option_wrapper_t bg_text_color{"pixdecor/bg_text_color"}; wf::option_wrapper_t button_color{"pixdecor/button_color"}; wf::option_wrapper_t button_line_thickness{"pixdecor/button_line_thickness"}; + wf::option_wrapper_t button_size{"pixdecor/button_size"}; wf::option_wrapper_t left_button_spacing{"pixdecor/left_button_spacing"}; wf::option_wrapper_t right_button_spacing{"pixdecor/right_button_spacing"}; wf::option_wrapper_t left_button_x_offset{"pixdecor/left_button_x_offset"}; @@ -427,6 +428,7 @@ class wayfire_pixdecor : public wf::plugin_interface_t effect_animate.set_callback([=] {option_changed_cb(false, false);}); button_color.set_callback([=] {recreate_frames();}); button_line_thickness.set_callback([=] {recreate_frames();}); + button_size.set_callback([=] {recreate_frames();}); left_button_spacing.set_callback([=] {recreate_frames();}); right_button_spacing.set_callback([=] {recreate_frames();}); left_button_x_offset.set_callback([=] {recreate_frames();});