diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-03 14:37:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-03 14:37:25 +0300 |
commit | c6961c03289205acee0faed8dc48fb7c7759005c (patch) | |
tree | 83fd127ad011be8b9affe17b7906f38bb4599b47 | |
parent | 6d2a3ccb8914481212fb7bef1affb55848d5d672 (diff) | |
download | manaplus-c6961c03289205acee0faed8dc48fb7c7759005c.tar.gz manaplus-c6961c03289205acee0faed8dc48fb7c7759005c.tar.bz2 manaplus-c6961c03289205acee0faed8dc48fb7c7759005c.tar.xz manaplus-c6961c03289205acee0faed8dc48fb7c7759005c.zip |
fix editdialog theming.
-rw-r--r-- | data/themes/jewelry/CMakeLists.txt | 1 | ||||
-rw-r--r-- | data/themes/jewelry/Makefile.am | 1 | ||||
-rw-r--r-- | data/themes/jewelry/edit.xml | 32 | ||||
-rw-r--r-- | src/gui/windows/editdialog.cpp | 12 |
4 files changed, 41 insertions, 5 deletions
diff --git a/data/themes/jewelry/CMakeLists.txt b/data/themes/jewelry/CMakeLists.txt index 1ddffb8f8..8bbc2517b 100644 --- a/data/themes/jewelry/CMakeLists.txt +++ b/data/themes/jewelry/CMakeLists.txt @@ -21,6 +21,7 @@ SET (FILES dropdown_background.xml dropdown_pressed.xml drops.xml + edit.xml emotes.xml emotetabs.xml equipment.xml diff --git a/data/themes/jewelry/Makefile.am b/data/themes/jewelry/Makefile.am index 856c06d57..b3d13d597 100644 --- a/data/themes/jewelry/Makefile.am +++ b/data/themes/jewelry/Makefile.am @@ -24,6 +24,7 @@ gui_DATA = \ dropdown_background.xml \ dropdown_pressed.xml \ drops.xml \ + edit.xml \ emotes.xml \ emotetabs.xml \ equipment.xml \ diff --git a/data/themes/jewelry/edit.xml b/data/themes/jewelry/edit.xml new file mode 100644 index 000000000..ad36753a2 --- /dev/null +++ b/data/themes/jewelry/edit.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<skinset name="Default" image="window.png"> + <widget type="Window" xpos="260" ypos="0"> + <option name="captionoffsetx" value="20" /> + <option name="captionoffsety" value="7" /> + <option name="titlebarBold" value="1" /> + <option name="titlebarHeight" value="35" /> + <option name="padding" value="10" /> + <option name="stickySpacing" value="6" /> + <option name="buttonPadding" value="8" /> + + <!-- Top Row --> + <part type="top-left-corner" xpos="0" ypos="0" width="30" height="53" /> + <part type="top-edge" xpos="31" ypos="0" width="48" height="53" /> + <part type="top-right-corner" xpos="80" ypos="0" width="30" height="53" /> + + <!-- Middle Row --> + <part type="left-edge" xpos="0" ypos="54" width="30" height="24" /> + <part type="bg-quad" xpos="31" ypos="54" width="48" height="24" /> + <part type="right-edge" xpos="80" ypos="54" width="30" height="24" /> + + <!-- Bottom Row --> + <part type="bottom-left-corner" xpos="0" ypos="79" width="30" height="28" /> + <part type="bottom-edge" xpos="31" ypos="79" width="48" height="28" /> + <part type="bottom-right-corner" xpos="80" ypos="79" width="30" height="28" /> + + <part type="closeImage" xpos="-163" ypos="0" width="22" height="22" /> + <part type="closeImageHighlighted" xpos="-138" ypos="0" width="22" height="22" /> + <part type="stickyImageUp" xpos="-130" ypos="51" width="19" height="22" /> + <part type="stickyImageDown" xpos="-99" ypos="51" width="19" height="22" /> + </widget> +</skinset> diff --git a/src/gui/windows/editdialog.cpp b/src/gui/windows/editdialog.cpp index f3c583d00..8c76fd6b3 100644 --- a/src/gui/windows/editdialog.cpp +++ b/src/gui/windows/editdialog.cpp @@ -51,13 +51,15 @@ void EditDialog::postInit() const int fontHeight = getFont()->getHeight(); const int height = numRows * fontHeight; const int pad = getPadding(); - - setContentSize(mDefaultWidth, height + fontHeight + okButton->getHeight()); + const int pad2 = pad * 2; mTextField->setPosition(pad, pad); - mTextField->setWidth(mDefaultWidth - 2 * pad); - + mTextField->setWidth(mDefaultWidth - pad2); + const int buttonPadding = getOption("buttonPadding", 8) + + mTextField->getHeight(); + setContentSize(mDefaultWidth, okButton->getHeight() + + buttonPadding + pad2); okButton->setPosition((mDefaultWidth - okButton->getWidth()) / 2, - height + getOption("buttonPadding", 8)); + buttonPadding + pad); add(mTextField); add(okButton); |