diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-18 02:00:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-18 02:00:19 +0300 |
commit | 43f84a5a22423b831b1d3a4b3572546803324dd4 (patch) | |
tree | 187459d3c84abae3d9001238b8314e577b68b107 /src/guichan/widgets | |
parent | 213bc274d777946f7c39e5f5ccd859e766aef4ae (diff) | |
download | mv-43f84a5a22423b831b1d3a4b3572546803324dd4.tar.gz mv-43f84a5a22423b831b1d3a4b3572546803324dd4.tar.bz2 mv-43f84a5a22423b831b1d3a4b3572546803324dd4.tar.xz mv-43f84a5a22423b831b1d3a4b3572546803324dd4.zip |
Extend dropdown theming.
New options in dropdown.xml:
padding - text padding from all sides
imagePadding - image padding from right
frameSize - frame size
Diffstat (limited to 'src/guichan/widgets')
-rw-r--r-- | src/guichan/widgets/dropdown.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
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() |