diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-06-07 22:21:47 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-06-07 22:21:47 +0200 |
commit | cb51ef44e8f3b6461e608171eb3468bc15a696da (patch) | |
tree | 6fabacaa283323034dc6dbd11acd0082f65cac82 /plugingui | |
parent | 7a5ede33b58b8935ce33c5363f7d500ba8663c63 (diff) |
Update all use of thinlistbox_*.png to new TexturedBox.
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/listboxthin.cc | 31 | ||||
-rw-r--r-- | plugingui/listboxthin.h | 13 | ||||
-rw-r--r-- | plugingui/resource_data.cc | 127 | ||||
-rw-r--r-- | plugingui/resources/thinlistbox.png | bin | 0 -> 188 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_b.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_bl.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_br.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_c.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_l.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_r.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_t.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_t_blue.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_tl.png | bin | 165 -> 0 bytes | |||
-rw-r--r-- | plugingui/resources/thinlistbox_tr.png | bin | 165 -> 0 bytes |
14 files changed, 27 insertions, 144 deletions
diff --git a/plugingui/listboxthin.cc b/plugingui/listboxthin.cc index 03b2594..5d8ab49 100644 --- a/plugingui/listboxthin.cc +++ b/plugingui/listboxthin.cc @@ -29,7 +29,8 @@ #include "painter.h" #include "font.h" -namespace GUI { +namespace GUI +{ ListBoxThin::ListBoxThin(Widget *parent) : Widget(parent) @@ -38,30 +39,11 @@ ListBoxThin::ListBoxThin(Widget *parent) , valueChangedNotifier(basic.valueChangedNotifier) , basic(this) { - box.topLeft = new Image(":thinlistbox_tl.png"); - box.top = new Image(":thinlistbox_t.png"); - box.topRight = new Image(":thinlistbox_tr.png"); - box.left = new Image(":thinlistbox_l.png"); - box.right = new Image(":thinlistbox_r.png"); - box.bottomLeft = new Image(":thinlistbox_bl.png"); - box.bottom = new Image(":thinlistbox_b.png"); - box.bottomRight = new Image(":thinlistbox_br.png"); - box.center = new Image(":thinlistbox_c.png"); - - basic.move(box.left->width(), box.top->height()); + basic.move(1, 1); } ListBoxThin::~ListBoxThin() { - delete box.topLeft; - delete box.top; - delete box.topRight; - delete box.left; - delete box.right; - delete box.bottomLeft; - delete box.bottom; - delete box.bottomRight; - delete box.center; } void ListBoxThin::addItem(std::string name, std::string value) @@ -107,14 +89,15 @@ void ListBoxThin::repaintEvent(RepaintEvent* repaintEvent) return; } - p.drawBox(0, 0, box, w, h); + box.setSize(w,h); + p.drawImage(0, 0, box); } void ListBoxThin::resize(int width, int height) { Widget::resize(width, height); - basic.resize(width - (box.left->width() + box.right->width()), - height - (box.top->height() + box.bottom->height())); + basic.resize(width - (1 + 1), + height - (1 + 1)); } } // GUI:: diff --git a/plugingui/listboxthin.h b/plugingui/listboxthin.h index 1617234..3f429f6 100644 --- a/plugingui/listboxthin.h +++ b/plugingui/listboxthin.h @@ -34,10 +34,14 @@ #include "widget.h" #include "painter.h" #include "listboxbasic.h" +#include "texturedbox.h" -namespace GUI { +namespace GUI +{ -class ListBoxThin : public Widget { +class ListBoxThin + : public Widget +{ public: ListBoxThin(Widget *parent); ~ListBoxThin(); @@ -62,7 +66,10 @@ public: private: ListBoxBasic basic; - Painter::Box box; + TexturedBox box{getImageCache(), ":thinlistbox.png", + 0, 0, // atlas offset (x, y) + 1, 1, 1, // dx1, dx2, dx3 + 1, 1, 1}; // dy1, dy2, dy3 }; } // GUI:: diff --git a/plugingui/resource_data.cc b/plugingui/resource_data.cc index 01c9c77..a58235d 100644 --- a/plugingui/resource_data.cc +++ b/plugingui/resource_data.cc @@ -2873,126 +2873,19 @@ const rc_data_t rc_data[] = "\36\156\131\132\343\101\44\34\76\33\274\276\323\13\266\366" "\52\347\364\346\223\172\263\275\312\71\375\377\277\113\265\60" "\205\220\343\373\0\0\0\0\111\105\116\104\256\102\140\202" }, - { ":thinlistbox_b.png", 165, + { ":thinlistbox.png", 188, "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" + "\0\0\0\3\0\0\0\3\10\6\0\0\0\126\50\265" + "\277\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\71\53\265\377\206\225\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_bl.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\71\61\110\235\177\357\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_br.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\71\70\61\101\307\113\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_c.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\15\37\43\155\306\327\227\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\140\360\235\363\37" - "\0\3\43\1\351\105\27\173\307\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_l.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\72\4\65\3\350\17\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_r.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\72\12\322\273\305\10\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_t.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\63\63\134\174\366\111\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_t_blue.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\54\57\205\47\244\230\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_tl.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\72\36\310\141\21\165\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, - { ":thinlistbox_tr.png", 165, - "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" - "\0\0\0\1\0\0\0\1\10\6\0\0\0\37\25\304" - "\211\0\0\0\6\142\113\107\104\0\377\0\377\0\377\240" - "\275\247\223\0\0\0\11\160\110\131\163\0\0\15\327\0" - "\0\15\327\1\102\50\233\170\0\0\0\7\164\111\115\105" - "\7\335\4\7\21\72\45\171\152\370\121\0\0\0\31\164" - "\105\130\164\103\157\155\155\145\156\164\0\103\162\145\141\164" - "\145\144\40\167\151\164\150\40\107\111\115\120\127\201\16\27" - "\0\0\0\15\111\104\101\124\10\327\143\330\176\373\377\177" - "\0\10\157\3\221\155\30\317\354\0\0\0\0\111\105\116" - "\104\256\102\140\202" }, + "\7\340\6\7\24\21\57\53\40\151\336\0\0\0\35\151" + "\124\130\164\103\157\155\155\145\156\164\0\0\0\0\0\103" + "\162\145\141\164\145\144\40\167\151\164\150\40\107\111\115\120" + "\144\56\145\7\0\0\0\40\111\104\101\124\10\327\143\334" + "\176\373\377\177\6\50\140\142\140\140\140\360\54\232\313\300" + "\300\300\300\300\210\54\3\0\301\217\10\175\16\116\61\171" + "\0\0\0\0\111\105\116\104\256\102\140\202" }, { ":vertline.png", 170, "\211\120\116\107\15\12\32\12\0\0\0\15\111\110\104\122" "\0\0\0\1\0\0\0\2\10\6\0\0\0\231\201\266" diff --git a/plugingui/resources/thinlistbox.png b/plugingui/resources/thinlistbox.png Binary files differnew file mode 100644 index 0000000..461cfa3 --- /dev/null +++ b/plugingui/resources/thinlistbox.png diff --git a/plugingui/resources/thinlistbox_b.png b/plugingui/resources/thinlistbox_b.png Binary files differdeleted file mode 100644 index 75b0b12..0000000 --- a/plugingui/resources/thinlistbox_b.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_bl.png b/plugingui/resources/thinlistbox_bl.png Binary files differdeleted file mode 100644 index 6c662cd..0000000 --- a/plugingui/resources/thinlistbox_bl.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_br.png b/plugingui/resources/thinlistbox_br.png Binary files differdeleted file mode 100644 index f79d91b..0000000 --- a/plugingui/resources/thinlistbox_br.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_c.png b/plugingui/resources/thinlistbox_c.png Binary files differdeleted file mode 100644 index 3b7f813..0000000 --- a/plugingui/resources/thinlistbox_c.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_l.png b/plugingui/resources/thinlistbox_l.png Binary files differdeleted file mode 100644 index f72b551..0000000 --- a/plugingui/resources/thinlistbox_l.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_r.png b/plugingui/resources/thinlistbox_r.png Binary files differdeleted file mode 100644 index 5b57b54..0000000 --- a/plugingui/resources/thinlistbox_r.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_t.png b/plugingui/resources/thinlistbox_t.png Binary files differdeleted file mode 100644 index 7baff4e..0000000 --- a/plugingui/resources/thinlistbox_t.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_t_blue.png b/plugingui/resources/thinlistbox_t_blue.png Binary files differdeleted file mode 100644 index e44504a..0000000 --- a/plugingui/resources/thinlistbox_t_blue.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_tl.png b/plugingui/resources/thinlistbox_tl.png Binary files differdeleted file mode 100644 index 3c38a2a..0000000 --- a/plugingui/resources/thinlistbox_tl.png +++ /dev/null diff --git a/plugingui/resources/thinlistbox_tr.png b/plugingui/resources/thinlistbox_tr.png Binary files differdeleted file mode 100644 index 6a5fd5d..0000000 --- a/plugingui/resources/thinlistbox_tr.png +++ /dev/null |