diff options
| author | octycs <2087987-octycs@users.noreply.gitlab.com> | 2019-02-15 22:56:48 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-03-11 23:42:58 +0000 |
| commit | 486e8fc78957db58b74a4032473c0f0ba526bbcd (patch) | |
| tree | 8076266d56bf6192289babd7e056d8e0ad13b9e7 /src/ui/widget/button.cpp | |
| parent | Don't translate Caligraphy presets in Preferences::_loadDefaults. (diff) | |
| download | inkscape-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/button.cpp')
| -rw-r--r-- | src/ui/widget/button.cpp | 8 |
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()); |
