summaryrefslogtreecommitdiff
path: root/src/gui/widgets/button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/button.cpp')
-rw-r--r--src/gui/widgets/button.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 990faaaeb..ba789f2c5 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -173,30 +173,10 @@ void Button::init()
if (mInstances == 0)
{
- // Load the skin
- Image *btn[BUTTON_COUNT];
-
if (Theme::instance())
{
for (int mode = 0; mode < BUTTON_COUNT; mode ++)
- {
- Skin *skin = Theme::instance()->load(data[mode]);
- if (skin)
- {
- const ImageRect &rect = skin->getBorder();
-
- for (int f = 0; f < 9; f ++)
- {
- if (rect.grid[f])
- {
- rect.grid[f]->incRef();
- button[mode].grid[f] = rect.grid[f];
- }
- }
-
- Theme::instance()->unload(skin);
- }
- }
+ Theme::instance()->loadRect(button[mode], data[mode]);
}
updateAlpha();