From 43f84a5a22423b831b1d3a4b3572546803324dd4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Oct 2012 02:00:19 +0300 Subject: Extend dropdown theming. New options in dropdown.xml: padding - text padding from all sides imagePadding - image padding from right frameSize - frame size --- src/guichan/widgets/dropdown.cpp | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'src/guichan') diff --git a/src/guichan/widgets/dropdown.cpp b/src/guichan/widgets/dropdown.cpp index 39248ab73..bb470fdeb 100644 --- a/src/guichan/widgets/dropdown.cpp +++ b/src/guichan/widgets/dropdown.cpp @@ -221,42 +221,6 @@ namespace gcn void DropDown::adjustHeight() { - if (!mScrollArea) - throw GCN_EXCEPTION("Scroll area has been deleted."); - - if (!mListBox) - throw GCN_EXCEPTION("List box has been deleted."); - - const int listBoxHeight = mListBox->getHeight(); - - // We add 2 for the border - const int h2 = getFont()->getHeight() + 2; - - setHeight(h2); - - // The addition/subtraction of 2 compensates for the seperation lines - // seperating the selected element view and the scroll area. - - if (mDroppedDown && getParent()) - { - const int h = getParent()->getChildrenArea().height - getY(); - - if (listBoxHeight > h - h2 - 2) - { - mScrollArea->setHeight(h - h2 - 2); - setHeight(h); - } - else - { - setHeight(listBoxHeight + h2 + 2); - mScrollArea->setHeight(listBoxHeight); - } - } - - mScrollArea->setWidth(getWidth()); - // Resize the ListBox to exactly fit the ScrollArea. - mListBox->setWidth(mScrollArea->getChildrenArea().width); - mScrollArea->setPosition(0, 0); } void DropDown::dropDown() -- cgit v1.2.3-60-g2f50