From d6af5da0a85693fd60d39c788289b76e77c8ff17 Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 23 Mar 2006 19:51:38 +0000 Subject: [PATCH] - abstract out box slider width (should probably be settable) - reduce it to 20 (30 is excessive and didn't match the property brower look) - call puSlider with this size explicitly (otherwise its size is derived from the font size, unlike the arrow buttons!) --- src/GUI/puList.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/GUI/puList.cxx b/src/GUI/puList.cxx index b95343779..fb4b33bee 100644 --- a/src/GUI/puList.cxx +++ b/src/GUI/puList.cxx @@ -103,25 +103,26 @@ puList::getListIntegerValue() void puList::init (int w, int h) { + const int sw = 20; _frame = new puFrame(0, 0, w, h); - _list_box = new puListBox(0, 0, w-30, h); + _list_box = new puListBox(0, 0, w-sw, h); _list_box->setStyle(-PUSTYLE_SMALL_SHADED); _list_box->setUserData(this); _list_box->setCallback(handle_list_entry); _list_box->setValue(0); - _slider = new puSlider(w-30, 30, h-60, true); + _slider = new puSlider(w-sw, sw, h-2*sw, true, sw); _slider->setValue(1.0f); _slider->setUserData(_list_box); _slider->setCallback(handle_slider); _slider->setCBMode(PUSLIDER_ALWAYS); - _down_arrow = new puArrowButton(w-30, 0, w, 30, PUARROW_DOWN) ; + _down_arrow = new puArrowButton(w-sw, 0, w, sw, PUARROW_DOWN) ; _down_arrow->setUserData(_slider); _down_arrow->setCallback(handle_arrow); - _up_arrow = new puArrowButton(w-30, h-30, w, h, PUARROW_UP); + _up_arrow = new puArrowButton(w-sw, h-sw, w, h, PUARROW_UP); _up_arrow->setUserData(_slider); _up_arrow->setCallback(handle_arrow); -- 2.39.5