summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authoroctycs <2087987-octycs@users.noreply.gitlab.com>2019-02-15 22:56:48 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-03-11 23:42:58 +0000
commit486e8fc78957db58b74a4032473c0f0ba526bbcd (patch)
tree8076266d56bf6192289babd7e056d8e0ad13b9e7 /src/ui/widget
parentDon't translate Caligraphy presets in Preferences::_loadDefaults. (diff)
downloadinkscape-486e8fc78957db58b74a4032473c0f0ba526bbcd.tar.gz
inkscape-486e8fc78957db58b74a4032473c0f0ba526bbcd.zip
Atempt to fix high load in background
Signed-off-by: octycs <2087987-octycs@users.noreply.gitlab.com>
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/button.cpp8
1 files changed, 4 insertions, 4 deletions
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());