diff options
| author | kbake | 2017-08-12 14:59:55 -0400 |
|---|---|---|
| committer | kbake | 2017-08-12 17:46:26 -0400 |
| commit | a72d17cf117e1783461fde5d2e2e68059449859f (patch) | |
| tree | aa790fa696e2d7f98d7c4529429db76b82b52b79 /scene/gui/scroll_bar.cpp | |
| parent | 3bea3256f5def126b2b6d639ed70c4ddc3990344 (diff) | |
| download | godot-a72d17cf117e1783461fde5d2e2e68059449859f.tar.gz godot-a72d17cf117e1783461fde5d2e2e68059449859f.tar.zst godot-a72d17cf117e1783461fde5d2e2e68059449859f.zip | |
Diffstat (limited to 'scene/gui/scroll_bar.cpp')
| -rw-r--r-- | scene/gui/scroll_bar.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index bd66cd274..2ccdbb05a 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -233,7 +233,14 @@ void ScrollBar::_notification(int p_what) { Ref<Texture> decr = highlight == HIGHLIGHT_DECR ? get_icon("decrement_highlight") : get_icon("decrement"); Ref<Texture> incr = highlight == HIGHLIGHT_INCR ? get_icon("increment_highlight") : get_icon("increment"); Ref<StyleBox> bg = has_focus() ? get_stylebox("scroll_focus") : get_stylebox("scroll"); - Ref<StyleBox> grabber = (drag.active || highlight == HIGHLIGHT_RANGE) ? get_stylebox("grabber_highlight") : get_stylebox("grabber"); + + Ref<StyleBox> grabber; + if (drag.active) + grabber = get_stylebox("grabber_pressed"); + else if (highlight == HIGHLIGHT_RANGE) + grabber = get_stylebox("grabber_highlight"); + else + grabber = get_stylebox("grabber"); Point2 ofs; |
