diff options
author | Po Lu <luangruo@yahoo.com> | 2022-01-17 10:46:55 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-01-17 10:46:55 +0000 |
commit | 1cd6737a38723f482db73a8e4739176a0d524c57 (patch) | |
tree | e5ac9f0a577940a10c2eb5a7d14b79eaf07308df | |
parent | 2fa1eced39f0e1b5495f3c582ee938e1e1dddcaf (diff) | |
download | emacs-1cd6737a38723f482db73a8e4739176a0d524c57.tar.gz emacs-1cd6737a38723f482db73a8e4739176a0d524c57.tar.bz2 emacs-1cd6737a38723f482db73a8e4739176a0d524c57.zip |
Use BControlLook to determine scroll bar size on Haiku
* src/haiku_support.cc (BScrollBar_default_size): Use
BControlLook instead of legacy constants.
-rw-r--r-- | src/haiku_support.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/haiku_support.cc b/src/haiku_support.cc index 0f4ec2cd7c3..22a977a4a69 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -36,6 +36,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include <interface/MenuBar.h> #include <interface/Alert.h> #include <interface/Button.h> +#include <interface/ControlLook.h> #include <locale/UnicodeChar.h> @@ -2019,7 +2020,9 @@ BView_scroll_bar_update (void *sb, int portion, int whole, int position) int BScrollBar_default_size (int horizontal_p) { - return horizontal_p ? B_H_SCROLL_BAR_HEIGHT : B_V_SCROLL_BAR_WIDTH; + return be_control_look->GetScrollBarWidth (horizontal_p + ? B_HORIZONTAL + : B_VERTICAL); } /* Invalidate VIEW, causing it to be drawn again. */ |