diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b40c7b3b1..cc463cf4d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -79,6 +79,7 @@ add_library(aseprite-library log.cpp recent_files.cpp resource_finder.cpp + skin_theme.cpp ui_context.cpp undoable.cpp xml_exception.cpp @@ -192,7 +193,6 @@ add_library(aseprite-library modules/gui.cpp modules/palettes.cpp modules/rootmenu.cpp - modules/skinneable_theme.cpp raster/algo.cpp raster/algofill.cpp raster/algo_polygon.cpp diff --git a/src/commands/cmd_refresh.cpp b/src/commands/cmd_refresh.cpp index 108ae41cd..82704ee80 100644 --- a/src/commands/cmd_refresh.cpp +++ b/src/commands/cmd_refresh.cpp @@ -30,9 +30,9 @@ #include "app.h" #include "commands/command.h" -#include "modules/skinneable_theme.h" -#include "widgets/statebar.h" +#include "skin_theme.h" #include "sprite_wrappers.h" +#include "widgets/statebar.h" ////////////////////////////////////////////////////////////////////// // refresh @@ -62,7 +62,7 @@ void RefreshCommand::onExecute(Context* context) // Reload skin { - SkinneableTheme* theme = (SkinneableTheme*)ji_get_theme(); + SkinTheme* theme = (SkinTheme*)ji_get_theme(); theme->reload_skin(); ji_regen_theme(); } diff --git a/src/dialogs/aniedit.cpp b/src/dialogs/aniedit.cpp index 5c1d1aa3a..92fe1881f 100644 --- a/src/dialogs/aniedit.cpp +++ b/src/dialogs/aniedit.cpp @@ -29,8 +29,8 @@ #include "modules/gfx.h" #include "modules/gui.h" #include "modules/rootmenu.h" -#include "modules/skinneable_theme.h" #include "raster/raster.h" +#include "skin_theme.h" #include "sprite_wrappers.h" #include "ui_context.h" #include "undoable.h" @@ -1115,7 +1115,7 @@ static void anieditor_draw_layer(JWidget widget, JRect clip, int layer_index) static void anieditor_draw_layer_padding(JWidget widget) { - SkinneableTheme* theme = static_cast(widget->theme); + SkinTheme* theme = static_cast(widget->theme); AniEditor* anieditor = anieditor_data(widget); int layer_index = anieditor->nlayers-1; int x1, y1, x2, y2; @@ -1138,7 +1138,7 @@ static void anieditor_draw_layer_padding(JWidget widget) static void anieditor_draw_cel(JWidget widget, JRect clip, int layer_index, int frame) { - SkinneableTheme* theme = static_cast(widget->theme); + SkinTheme* theme = static_cast(widget->theme); AniEditor* anieditor = anieditor_data(widget); Layer *layer = anieditor->layers[layer_index]; bool selected_layer = (layer == anieditor->sprite->getCurrentLayer()); diff --git a/src/modules/gfx.cpp b/src/modules/gfx.cpp index 0185c1ba4..403d179d0 100644 --- a/src/modules/gfx.cpp +++ b/src/modules/gfx.cpp @@ -35,10 +35,10 @@ #include "modules/gfx.h" #include "modules/gui.h" #include "modules/palettes.h" -#include "modules/skinneable_theme.h" #include "raster/blend.h" #include "raster/image.h" #include "raster/palette.h" +#include "skin_theme.h" #include "widgets/editor.h" static BITMAP* gfx_bmps[GFX_BITMAP_COUNT]; @@ -497,7 +497,7 @@ void draw_color_button(BITMAP* bmp, bool outer_se, bool outer_s, bool outer_sw, bool outer_w, int imgtype, const Color& color, bool hot, bool drag) { - SkinneableTheme* theme = (SkinneableTheme*)ji_get_theme(); + SkinTheme* theme = (SkinTheme*)ji_get_theme(); int scale = jguiscale(); // Draw background (the color) diff --git a/src/modules/gui.cpp b/src/modules/gui.cpp index f3bff383f..379cae40c 100644 --- a/src/modules/gui.cpp +++ b/src/modules/gui.cpp @@ -44,9 +44,9 @@ #include "modules/gui.h" #include "modules/palettes.h" #include "modules/rootmenu.h" -#include "modules/skinneable_theme.h" #include "raster/sprite.h" #include "resource_finder.h" +#include "skin_theme.h" #include "sprite_wrappers.h" #include "tools/toolbox.h" #include "ui_context.h" @@ -297,7 +297,7 @@ gfx_done:; jwidget_add_hook(manager, JI_WIDGET, manager_msg_proc, NULL); /* setup the standard jinete theme for widgets */ - ji_set_theme(ase_theme = new SkinneableTheme()); + ji_set_theme(ase_theme = new SkinTheme()); // Setup the handler for window-resize events set_resize_callback(resize_callback); @@ -617,7 +617,7 @@ static void destroy_default_font() static void reload_default_font() { JTheme theme = ji_get_theme(); - SkinneableTheme* skinneable_theme = static_cast(theme); + SkinTheme* skin_theme = static_cast(theme); const char *user_font; destroy_default_font(); @@ -629,8 +629,8 @@ static void reload_default_font() if ((user_font) && (*user_font)) rf.addPath(user_font); - // TODO This should be in SkinneableTheme class - rf.findInDataDir(skinneable_theme->get_font_filename().c_str()); + // TODO This should be in SkinTheme class + rf.findInDataDir(skin_theme->get_font_filename().c_str()); // Try to load the font while (const char* path = rf.next()) { diff --git a/src/modules/skinneable_theme.cpp b/src/skin_theme.cpp similarity index 92% rename from src/modules/skinneable_theme.cpp rename to src/skin_theme.cpp index 92056b798..3184ebdc4 100644 --- a/src/modules/skinneable_theme.cpp +++ b/src/skin_theme.cpp @@ -27,8 +27,8 @@ #include "gui/jintern.h" #include "loadpng.h" #include "modules/gui.h" -#include "modules/skinneable_theme.h" #include "resource_finder.h" +#include "skin_theme.h" #include "xml_exception.h" #include "tinyxml.h" @@ -69,9 +69,9 @@ static struct { "eyedropper", 0, 0 }, // JI_CURSOR_EYEDROPPER }; -SkinneableTheme::SkinneableTheme() +SkinTheme::SkinTheme() { - this->name = "Skinneable Theme"; + this->name = "Skin Theme"; m_selected_skin = get_config_string("Skin", "Selected", "default_skin"); // Initialize all graphics in NULL (these bitmaps are loaded from the skin) @@ -136,7 +136,7 @@ SkinneableTheme::SkinneableTheme() reload_skin(); } -SkinneableTheme::~SkinneableTheme() +SkinTheme::~SkinTheme() { for (int c=0; cborder_width.l = (n); \ @@ -528,7 +528,7 @@ void SkinneableTheme::init_widget(JWidget widget) Button* button = new Button(""); setup_bevels(button, 0, 0, 0, 0); jwidget_add_hook(button, JI_WIDGET, - &SkinneableTheme::theme_frame_button_msg_proc, NULL); + &SkinTheme::theme_frame_button_msg_proc, NULL); jwidget_decorative(button, true); jwidget_add_child(widget, button); button->setName("theme_close_button"); @@ -552,12 +552,12 @@ void SkinneableTheme::init_widget(JWidget widget) } } -JRegion SkinneableTheme::get_window_mask(JWidget widget) +JRegion SkinTheme::get_window_mask(JWidget widget) { return jregion_new(widget->rc, 1); } -void SkinneableTheme::map_decorative_widget(JWidget widget) +void SkinTheme::map_decorative_widget(JWidget widget) { if (widget->name != NULL && strcmp(widget->name, "theme_close_button") == 0) { @@ -576,42 +576,42 @@ void SkinneableTheme::map_decorative_widget(JWidget widget) } } -int SkinneableTheme::color_foreground() +int SkinTheme::color_foreground() { return COLOR_FOREGROUND; } -int SkinneableTheme::color_disabled() +int SkinTheme::color_disabled() { return COLOR_DISABLED; } -int SkinneableTheme::color_face() +int SkinTheme::color_face() { return COLOR_FACE; } -int SkinneableTheme::color_hotface() +int SkinTheme::color_hotface() { return COLOR_HOTFACE; } -int SkinneableTheme::color_selected() +int SkinTheme::color_selected() { return COLOR_SELECTED; } -int SkinneableTheme::color_background() +int SkinTheme::color_background() { return COLOR_BACKGROUND; } -void SkinneableTheme::draw_box(JWidget widget, JRect clip) +void SkinTheme::draw_box(JWidget widget, JRect clip) { jdraw_rectfill(clip, BGCOLOR); } -void SkinneableTheme::draw_button(ButtonBase* widget, JRect clip) +void SkinTheme::draw_button(ButtonBase* widget, JRect clip) { BITMAP* icon_bmp = widget->getButtonIcon(); int icon_align = widget->getButtonIconAlign(); @@ -703,7 +703,7 @@ void SkinneableTheme::draw_button(ButtonBase* widget, JRect clip) } } -void SkinneableTheme::draw_check(ButtonBase* widget, JRect clip) +void SkinTheme::draw_check(ButtonBase* widget, JRect clip) { struct jrect box, text, icon; int bg; @@ -744,12 +744,12 @@ void SkinneableTheme::draw_check(ButtonBase* widget, JRect clip) } } -void SkinneableTheme::draw_grid(JWidget widget, JRect clip) +void SkinTheme::draw_grid(JWidget widget, JRect clip) { jdraw_rectfill(clip, BGCOLOR); } -void SkinneableTheme::draw_entry(Entry* widget, JRect clip) +void SkinTheme::draw_entry(Entry* widget, JRect clip) { bool password = widget->isPassword(); int scroll, caret, state, selbeg, selend; @@ -821,7 +821,7 @@ void SkinneableTheme::draw_entry(Entry* widget, JRect clip) draw_entry_caret(widget, x, y); } -void SkinneableTheme::draw_label(JWidget widget, JRect clip) +void SkinTheme::draw_label(JWidget widget, JRect clip) { int bg = BGCOLOR; @@ -830,7 +830,7 @@ void SkinneableTheme::draw_label(JWidget widget, JRect clip) draw_textstring(NULL, -1, bg, false, widget, widget->rc, 0); } -void SkinneableTheme::draw_link_label(JWidget widget, JRect clip) +void SkinTheme::draw_link_label(JWidget widget, JRect clip) { int bg = BGCOLOR; @@ -847,12 +847,12 @@ void SkinneableTheme::draw_link_label(JWidget widget, JRect clip) } } -void SkinneableTheme::draw_listbox(JWidget widget, JRect clip) +void SkinTheme::draw_listbox(JWidget widget, JRect clip) { jdraw_rectfill(widget->rc, COLOR_BACKGROUND); } -void SkinneableTheme::draw_listitem(JWidget widget, JRect clip) +void SkinTheme::draw_listitem(JWidget widget, JRect clip) { int fg, bg; int x, y; @@ -892,12 +892,12 @@ void SkinneableTheme::draw_listitem(JWidget widget, JRect clip) } } -void SkinneableTheme::draw_menu(JWidget widget, JRect clip) +void SkinTheme::draw_menu(JWidget widget, JRect clip) { jdraw_rectfill(widget->rc, BGCOLOR); } -void SkinneableTheme::draw_menuitem(JWidget widget, JRect clip) +void SkinTheme::draw_menuitem(JWidget widget, JRect clip) { int c, bg, fg, bar; int x1, y1, x2, y2; @@ -1009,12 +1009,12 @@ void SkinneableTheme::draw_menuitem(JWidget widget, JRect clip) } } -void SkinneableTheme::draw_panel(JWidget widget, JRect clip) +void SkinTheme::draw_panel(JWidget widget, JRect clip) { jdraw_rectfill(widget->rc, get_panel_face_color()); } -void SkinneableTheme::draw_radio(ButtonBase* widget, JRect clip) +void SkinTheme::draw_radio(ButtonBase* widget, JRect clip) { struct jrect box, text, icon; int bg = BGCOLOR; @@ -1055,7 +1055,7 @@ void SkinneableTheme::draw_radio(ButtonBase* widget, JRect clip) } } -void SkinneableTheme::draw_separator(JWidget widget, JRect clip) +void SkinTheme::draw_separator(JWidget widget, JRect clip) { int x1, y1, x2, y2; @@ -1107,7 +1107,7 @@ static bool my_add_clip_rect(BITMAP *bitmap, int x1, int y1, int x2, int y2) return true; } -void SkinneableTheme::draw_slider(Slider* widget, JRect clip) +void SkinTheme::draw_slider(Slider* widget, JRect clip) { int x, x1, y1, x2, y2; int min, max, value; @@ -1195,7 +1195,7 @@ void SkinneableTheme::draw_slider(Slider* widget, JRect clip) } } -void SkinneableTheme::draw_combobox_entry(Entry* widget, JRect clip) +void SkinTheme::draw_combobox_entry(Entry* widget, JRect clip) { bool password = widget->isPassword(); int scroll, caret, state, selbeg, selend; @@ -1267,7 +1267,7 @@ void SkinneableTheme::draw_combobox_entry(Entry* widget, JRect clip) draw_entry_caret(widget, x, y); } -void SkinneableTheme::draw_combobox_button(ButtonBase* widget, JRect clip) +void SkinTheme::draw_combobox_button(ButtonBase* widget, JRect clip) { BITMAP* icon_bmp = m_part[PART_COMBOBOX_ARROW]; struct jrect icon; @@ -1315,14 +1315,14 @@ void SkinneableTheme::draw_combobox_button(ButtonBase* widget, JRect clip) draw_trans_sprite(ji_screen, icon_bmp, icon.x1, icon.y1); } -void SkinneableTheme::draw_textbox(JWidget widget, JRect clip) +void SkinTheme::draw_textbox(JWidget widget, JRect clip) { _ji_theme_textbox_draw(ji_screen, widget, NULL, NULL, widget->theme->textbox_bg_color, widget->theme->textbox_fg_color); } -void SkinneableTheme::draw_view(JWidget widget, JRect clip) +void SkinTheme::draw_view(JWidget widget, JRect clip) { draw_bounds_nw(ji_screen, widget->rc->x1, @@ -1334,7 +1334,7 @@ void SkinneableTheme::draw_view(JWidget widget, JRect clip) COLOR_BACKGROUND); } -void SkinneableTheme::draw_view_scrollbar(JWidget widget, JRect clip) +void SkinTheme::draw_view_scrollbar(JWidget widget, JRect clip) { int x1, y1, x2, y2; int u1, v1, u2, v2; @@ -1373,12 +1373,12 @@ void SkinneableTheme::draw_view_scrollbar(JWidget widget, JRect clip) get_scrollbar_thumb_face_color()); } -void SkinneableTheme::draw_view_viewport(JWidget widget, JRect clip) +void SkinTheme::draw_view_viewport(JWidget widget, JRect clip) { jdraw_rectfill(widget->rc, BGCOLOR); } -void SkinneableTheme::draw_frame(Frame* window, JRect clip) +void SkinTheme::draw_frame(Frame* window, JRect clip) { JRect pos = jwidget_get_rect(window); JRect cpos = jwidget_get_child_rect(window); @@ -1420,7 +1420,7 @@ void SkinneableTheme::draw_frame(Frame* window, JRect clip) jrect_free(cpos); } -void SkinneableTheme::draw_frame_button(ButtonBase* widget, JRect clip) +void SkinTheme::draw_frame_button(ButtonBase* widget, JRect clip) { int part; @@ -1435,7 +1435,7 @@ void SkinneableTheme::draw_frame_button(ButtonBase* widget, JRect clip) draw_trans_sprite(ji_screen, m_part[part], widget->rc->x1, widget->rc->y1); } -int SkinneableTheme::get_bg_color(JWidget widget) +int SkinTheme::get_bg_color(JWidget widget) { int c = jwidget_get_bg_color(widget); int decorative = jwidget_is_decorative(widget); @@ -1444,7 +1444,7 @@ int SkinneableTheme::get_bg_color(JWidget widget) COLOR_FACE); } -void SkinneableTheme::draw_textstring(const char *t, int fg_color, int bg_color, +void SkinTheme::draw_textstring(const char *t, int fg_color, int bg_color, bool fill_bg, JWidget widget, const JRect rect, int selected_offset) { @@ -1514,7 +1514,7 @@ void SkinneableTheme::draw_textstring(const char *t, int fg_color, int bg_color, } } -void SkinneableTheme::draw_entry_caret(Entry* widget, int x, int y) +void SkinTheme::draw_entry_caret(Entry* widget, int x, int y) { int h = jwidget_get_text_height(widget); @@ -1522,7 +1522,7 @@ void SkinneableTheme::draw_entry_caret(Entry* widget, int x, int y) vline(ji_screen, x+1, y-1, y+h, COLOR_FOREGROUND); } -BITMAP* SkinneableTheme::get_toolicon(const char* tool_id) const +BITMAP* SkinTheme::get_toolicon(const char* tool_id) const { std::map::const_iterator it = m_toolicon.find(tool_id); if (it != m_toolicon.end()) @@ -1591,7 +1591,7 @@ BITMAP* SkinneableTheme::get_toolicon(const char* tool_id) const set_clip_rect(_bmp, cx1, cy1, cx2, cy2); \ } -void SkinneableTheme::draw_bounds_array(BITMAP* bmp, int x1, int y1, int x2, int y2, int parts[8]) +void SkinTheme::draw_bounds_array(BITMAP* bmp, int x1, int y1, int x2, int y2, int parts[8]) { int nw = parts[0]; int n = parts[1]; @@ -1608,7 +1608,7 @@ void SkinneableTheme::draw_bounds_array(BITMAP* bmp, int x1, int y1, int x2, int se, s, sw, w, draw_trans_sprite); } -void SkinneableTheme::draw_bounds_nw(BITMAP* bmp, int x1, int y1, int x2, int y2, int nw, int bg) +void SkinTheme::draw_bounds_nw(BITMAP* bmp, int x1, int y1, int x2, int y2, int nw, int bg) { set_alpha_blender(); draw_bounds_template(bmp, @@ -1626,7 +1626,7 @@ void SkinneableTheme::draw_bounds_nw(BITMAP* bmp, int x1, int y1, int x2, int y2 } } -void SkinneableTheme::draw_bounds_nw2(BITMAP* bmp, int x1, int y1, int x2, int y2, int x_mid, int nw1, int nw2, int bg1, int bg2) +void SkinTheme::draw_bounds_nw2(BITMAP* bmp, int x1, int y1, int x2, int y2, int x_mid, int nw1, int nw2, int bg1, int bg2) { int cx1, cy1, cx2, cy2; get_clip_rect(bmp, &cx1, &cy1, &cx2, &cy2); @@ -1642,7 +1642,7 @@ void SkinneableTheme::draw_bounds_nw2(BITMAP* bmp, int x1, int y1, int x2, int y set_clip_rect(bmp, cx1, cy1, cx2, cy2); } -void SkinneableTheme::draw_part_as_hline(BITMAP* bmp, int x1, int y1, int x2, int y2, int part) +void SkinTheme::draw_part_as_hline(BITMAP* bmp, int x1, int y1, int x2, int y2, int part) { int x; @@ -1665,7 +1665,7 @@ void SkinneableTheme::draw_part_as_hline(BITMAP* bmp, int x1, int y1, int x2, in } } -void SkinneableTheme::draw_part_as_vline(BITMAP* bmp, int x1, int y1, int x2, int y2, int part) +void SkinTheme::draw_part_as_vline(BITMAP* bmp, int x1, int y1, int x2, int y2, int part) { int y; @@ -1688,7 +1688,7 @@ void SkinneableTheme::draw_part_as_vline(BITMAP* bmp, int x1, int y1, int x2, in } } -void SkinneableTheme::draw_bevel_box(int x1, int y1, int x2, int y2, int c1, int c2, int *bevel) +void SkinTheme::draw_bevel_box(int x1, int y1, int x2, int y2, int c1, int c2, int *bevel) { hline(ji_screen, x1+bevel[0], y1, x2-bevel[1], c1); /* top */ hline(ji_screen, x1+bevel[2], y2, x2-bevel[3], c2); /* bottom */ @@ -1703,7 +1703,7 @@ void SkinneableTheme::draw_bevel_box(int x1, int y1, int x2, int y2, int c1, int line(ji_screen, x2-bevel[3], y2, x2, y2-bevel[3], c2); /* bottom-right */ } -void SkinneableTheme::less_bevel(int *bevel) +void SkinTheme::less_bevel(int *bevel) { if (bevel[0] > 0) --bevel[0]; if (bevel[1] > 0) --bevel[1]; @@ -1712,7 +1712,7 @@ void SkinneableTheme::less_bevel(int *bevel) } /* controls the "X" button in a window to close it */ -bool SkinneableTheme::theme_frame_button_msg_proc(JWidget widget, JMessage msg) +bool SkinTheme::theme_frame_button_msg_proc(JWidget widget, JMessage msg) { switch (msg->type) { @@ -1725,7 +1725,7 @@ bool SkinneableTheme::theme_frame_button_msg_proc(JWidget widget, JMessage msg) ButtonBase* button = dynamic_cast(widget); ASSERT(button && "theme_frame_button_msg_proc() must be hooked in a ButtonBase widget"); - ((SkinneableTheme*)widget->theme)->draw_frame_button(button, &msg->draw.rect); + ((SkinTheme*)widget->theme)->draw_frame_button(button, &msg->draw.rect); } return true; diff --git a/src/modules/skinneable_theme.h b/src/skin_theme.h similarity index 98% rename from src/modules/skinneable_theme.h rename to src/skin_theme.h index 90df5afbe..8bb4b6fd4 100644 --- a/src/modules/skinneable_theme.h +++ b/src/skin_theme.h @@ -16,8 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef MODULES_SKINNEABLE_THEME_H_INCLUDED -#define MODULES_SKINNEABLE_THEME_H_INCLUDED +#ifndef SKIN_THEME_H_INCLUDED +#define SKIN_THEME_H_INCLUDED #include #include @@ -418,7 +418,9 @@ enum { PARTS }; -class SkinneableTheme : public jtheme +// This is the GUI theme used by ASE (which use images from data/skins +// directory). +class SkinTheme : public jtheme { std::string m_selected_skin; BITMAP* m_sheet_bmp; @@ -427,8 +429,8 @@ class SkinneableTheme : public jtheme std::map m_toolicon; public: - SkinneableTheme(); - ~SkinneableTheme(); + SkinTheme(); + ~SkinTheme(); void reload_skin(); diff --git a/src/widgets/color_bar.cpp b/src/widgets/color_bar.cpp index c438a5bd3..b9d83e7af 100644 --- a/src/widgets/color_bar.cpp +++ b/src/widgets/color_bar.cpp @@ -34,11 +34,11 @@ #include "modules/gfx.h" #include "modules/gui.h" #include "modules/palettes.h" -#include "modules/skinneable_theme.h" #include "raster/image.h" #include "raster/palette.h" #include "raster/sprite.h" #include "raster/undo.h" +#include "skin_theme.h" #include "sprite_wrappers.h" #include "ui_context.h" #include "widgets/color_bar.h" @@ -172,7 +172,7 @@ bool ColorBar::onProcessMessage(JMessage msg) ASSERT(m_colorsPerColumn*m_columns <= 256); } - SkinneableTheme* theme = static_cast(this->theme); + SkinTheme* theme = static_cast(this->theme); BITMAP *doublebuffer = create_bitmap(jrect_w(&msg->draw.rect), jrect_h(&msg->draw.rect)); int imgtype = app_get_current_image_type(); diff --git a/src/widgets/editor/editor.cpp b/src/widgets/editor/editor.cpp index 7c6cc43d9..283673404 100644 --- a/src/widgets/editor/editor.cpp +++ b/src/widgets/editor/editor.cpp @@ -34,9 +34,10 @@ #include "modules/gfx.h" #include "modules/gui.h" #include "modules/palettes.h" -#include "modules/skinneable_theme.h" #include "raster/raster.h" #include "settings/settings.h" +#include "skin_theme.h" +#include "sprite_wrappers.h" #include "tools/tool.h" #include "ui_context.h" #include "util/boundary.h" @@ -46,7 +47,6 @@ #include "widgets/editor.h" #include "widgets/editor/pixels_movement.h" #include "widgets/statebar.h" -#include "sprite_wrappers.h" #define has_shifts(msg,shift) \ (((msg)->any.shifts & (shift)) == (shift)) @@ -63,7 +63,7 @@ static bool editor_view_msg_proc(JWidget widget, JMessage msg); JWidget editor_view_new() { JWidget widget = jview_new(); - SkinneableTheme* theme = static_cast(widget->theme); + SkinTheme* theme = static_cast(widget->theme); int l = theme->get_part(PART_EDITOR_SELECTED_W)->w; int t = theme->get_part(PART_EDITOR_SELECTED_N)->h; int r = theme->get_part(PART_EDITOR_SELECTED_E)->w; @@ -861,7 +861,7 @@ static bool editor_view_msg_proc(JWidget widget, JMessage msg) JWidget viewport = jview_get_viewport(widget); JWidget child = reinterpret_cast(jlist_first_data(viewport->children)); JRect pos = jwidget_get_rect(widget); - SkinneableTheme* theme = static_cast(widget->theme); + SkinTheme* theme = static_cast(widget->theme); theme->draw_bounds_nw(ji_screen, pos->x1, pos->y1, @@ -905,7 +905,7 @@ bool Editor::onProcessMessage(JMessage msg) break; case JM_DRAW: { - SkinneableTheme* theme = static_cast(this->theme); + SkinTheme* theme = static_cast(this->theme); if (m_old_cursor_thick == 0) { m_old_cursor_thick = m_cursor_thick; diff --git a/src/widgets/statebar.cpp b/src/widgets/statebar.cpp index b5a3b4e21..cd1ea25f9 100644 --- a/src/widgets/statebar.cpp +++ b/src/widgets/statebar.cpp @@ -33,12 +33,12 @@ #include "modules/gfx.h" #include "modules/gui.h" #include "modules/palettes.h" -#include "modules/skinneable_theme.h" #include "raster/cel.h" #include "raster/image.h" #include "raster/layer.h" #include "raster/sprite.h" #include "raster/undo.h" +#include "skin_theme.h" #include "sprite_wrappers.h" #include "tools/tool.h" #include "ui_context.h" @@ -392,7 +392,7 @@ bool StatusBar::onProcessMessage(JMessage msg) break; case JM_DRAW: { - SkinneableTheme* theme = static_cast(this->theme); + SkinTheme* theme = static_cast(this->theme); int text_color = ji_color_foreground(); int face_color = ji_color_face(); JRect rc = jwidget_get_rect(this); diff --git a/src/widgets/tabs.cpp b/src/widgets/tabs.cpp index 6494578ee..27b9a2a98 100644 --- a/src/widgets/tabs.cpp +++ b/src/widgets/tabs.cpp @@ -26,7 +26,7 @@ #include "gui/jintern.h" #include "modules/gfx.h" #include "modules/gui.h" -#include "modules/skinneable_theme.h" +#include "skin_theme.h" #include "widgets/tabs.h" #define ARROW_W (12*jguiscale()) @@ -187,7 +187,7 @@ void* Tabs::getSelectedTab() bool Tabs::onProcessMessage(JMessage msg) { - SkinneableTheme* theme = static_cast(this->theme); + SkinTheme* theme = static_cast(this->theme); switch (msg->type) { @@ -407,7 +407,7 @@ void Tabs::drawTab(BITMAP* bmp, JRect box, Tab* tab, int y_delta, bool selected) if (box->x1 >= this->rc->x2 || box->x2 <= this->rc->x1) return; - SkinneableTheme* theme = static_cast(this->theme); + SkinTheme* theme = static_cast(this->theme); int text_color; int face_color; @@ -592,7 +592,7 @@ int Tabs::calcTabWidth(Tab* tab) { int border = 4*jguiscale(); #ifdef CLOSE_BUTTON_IN_EACH_TAB - SkinneableTheme* theme = static_cast(this->theme); + SkinTheme* theme = static_cast(this->theme); int close_icon_w = theme->get_part(PART_WINDOW_CLOSE_BUTTON_NORMAL)->w; return (border + text_length(getFont(), tab->text.c_str()) + border + close_icon_w + border); #else diff --git a/src/widgets/toolbar.cpp b/src/widgets/toolbar.cpp index 6314c10de..8b0626202 100644 --- a/src/widgets/toolbar.cpp +++ b/src/widgets/toolbar.cpp @@ -31,7 +31,7 @@ #include "gui/jinete.h" #include "modules/gfx.h" #include "modules/gui.h" -#include "modules/skinneable_theme.h" +#include "skin_theme.h" #include "tools/toolbox.h" #include "ui_context.h" #include "widgets/groupbut.h" @@ -111,7 +111,7 @@ private: static Size getToolIconSize(Widget* widget) { - SkinneableTheme* theme = static_cast(widget->theme); + SkinTheme* theme = static_cast(widget->theme); BITMAP* icon = theme->get_toolicon("configuration"); if (icon) return Size(icon->w, icon->h); @@ -187,7 +187,7 @@ bool ToolBar::onProcessMessage(JMessage msg) case JM_DRAW: { BITMAP *doublebuffer = create_bitmap(jrect_w(&msg->draw.rect), jrect_h(&msg->draw.rect)); - SkinneableTheme* theme = static_cast(this->theme); + SkinTheme* theme = static_cast(this->theme); ToolBox* toolbox = App::instance()->getToolBox(); ToolGroupList::iterator it = toolbox->begin_group(); int groups = toolbox->getGroupsCount(); @@ -594,7 +594,7 @@ bool ToolStrip::onProcessMessage(JMessage msg) case JM_DRAW: { BITMAP *doublebuffer = create_bitmap(jrect_w(&msg->draw.rect), jrect_h(&msg->draw.rect)); - SkinneableTheme* theme = static_cast(this->theme); + SkinTheme* theme = static_cast(this->theme); ToolBox* toolbox = App::instance()->getToolBox(); Rect toolrc; int index = 0;