From 486e8fc78957db58b74a4032473c0f0ba526bbcd Mon Sep 17 00:00:00 2001 From: octycs <2087987-octycs@users.noreply.gitlab.com> Date: Fri, 15 Feb 2019 23:56:48 +0100 Subject: Atempt to fix high load in background Signed-off-by: octycs <2087987-octycs@users.noreply.gitlab.com> --- src/ui/widget/button.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/widget/button.cpp') diff --git a/src/ui/widget/button.cpp b/src/ui/widget/button.cpp index a149f28a8..f119c069f 100644 --- a/src/ui/widget/button.cpp +++ b/src/ui/widget/button.cpp @@ -52,8 +52,8 @@ Button::get_preferred_width_vfunc(int &minimal_width, int &natural_width) const auto context = get_style_context(); - auto padding = context->get_padding(Gtk::STATE_FLAG_NORMAL); - auto border = context->get_border(Gtk::STATE_FLAG_NORMAL); + auto padding = context->get_padding(context->get_state()); + auto border = context->get_border(context->get_state()); minimal_width += MAX(2, padding.get_left() + padding.get_right() + border.get_left() + border.get_right()); natural_width += MAX(2, padding.get_left() + padding.get_right() + border.get_left() + border.get_right()); @@ -73,8 +73,8 @@ Button::get_preferred_height_vfunc(int &minimal_height, int &natural_height) con auto context = get_style_context(); - auto padding = context->get_padding(Gtk::STATE_FLAG_NORMAL); - auto border = context->get_border(Gtk::STATE_FLAG_NORMAL); + auto padding = context->get_padding(context->get_state()); + auto border = context->get_border(context->get_state()); minimal_height += MAX(2, padding.get_top() + padding.get_bottom() + border.get_top() + border.get_bottom()); natural_height += MAX(2, padding.get_top() + padding.get_bottom() + border.get_top() + border.get_bottom()); -- cgit v1.2.3