mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Add Them::paintTooltip and changed the tooltip skin with rounded borders and shadow.
+ Move all parts definition to src/skin_parts.h.
This commit is contained in:
parent
01f3f9ffab
commit
5de5cfc8e1
Binary file not shown.
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.8 KiB |
@ -111,6 +111,8 @@
|
||||
<part id="colorbar_border_hotfg" x="32" y="224" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" />
|
||||
<part id="scrollbar_bg" x="64" y="144" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" />
|
||||
<part id="scrollbar_thumb" x="64" y="160" w1="5" w2="6" w3="5" h1="5" h2="6" h3="5" />
|
||||
<part id="tooltip" x="112" y="224" w1="5" w2="6" w3="5" h1="5" h2="5" h3="6" />
|
||||
<part id="tooltip_arrow" x="128" y="224" w1="5" w2="6" w3="5" h1="5" h2="5" h3="6" />
|
||||
</parts>
|
||||
|
||||
</skin>
|
||||
|
@ -68,6 +68,7 @@ public:
|
||||
virtual void draw_view_scrollbar(JWidget widget, JRect clip) = 0;
|
||||
virtual void draw_view_viewport(JWidget widget, JRect clip) = 0;
|
||||
virtual void paintFrame(PaintEvent& ev) = 0;
|
||||
virtual void paintTooltip(PaintEvent& ev) = 0;
|
||||
|
||||
protected:
|
||||
virtual void onRegenerate() = 0;
|
||||
|
@ -201,10 +201,10 @@ bool TipWindow::onProcessMessage(JMessage msg)
|
||||
|
||||
case JM_SIGNAL:
|
||||
if (msg->signal.num == JI_SIGNAL_INIT_THEME) {
|
||||
this->border_width.l = 3 * jguiscale();
|
||||
this->border_width.t = 3 * jguiscale();
|
||||
this->border_width.r = 3 * jguiscale();
|
||||
this->border_width.b = 3 * jguiscale();
|
||||
this->border_width.l = 4 * jguiscale();
|
||||
this->border_width.t = 4 * jguiscale();
|
||||
this->border_width.r = 4 * jguiscale();
|
||||
this->border_width.b = 5 * jguiscale();
|
||||
|
||||
// Setup the background color.
|
||||
setBgColor(makecol(255, 255, 200));
|
||||
@ -291,16 +291,5 @@ void TipWindow::onPreferredSize(PreferredSizeEvent& ev)
|
||||
|
||||
void TipWindow::onPaint(PaintEvent& ev)
|
||||
{
|
||||
Graphics* g = ev.getGraphics();
|
||||
Rect pos = getClientBounds();
|
||||
|
||||
for (int i=0; i<jguiscale(); ++i) {
|
||||
g->drawRect(makecol(0, 0, 0), pos);
|
||||
pos.shrink(1);
|
||||
}
|
||||
|
||||
g->fillRect(this->getBgColor(), pos);
|
||||
pos.shrink(getBorder());
|
||||
|
||||
g->drawString(getText(), ji_color_foreground(), this->getBgColor(), pos, getAlign());
|
||||
getTheme()->paintTooltip(ev);
|
||||
}
|
||||
|
403
src/skin/skin_parts.h
Normal file
403
src/skin/skin_parts.h
Normal file
@ -0,0 +1,403 @@
|
||||
/* ASE - Allegro Sprite Editor
|
||||
* Copyright (C) 2001-2011 David Capello
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SKIN_PARTS_H_INCLUDED
|
||||
#define SKIN_PARTS_H_INCLUDED
|
||||
|
||||
// Available parts in the skin sheet
|
||||
enum {
|
||||
|
||||
PART_RADIO_NORMAL,
|
||||
PART_RADIO_SELECTED,
|
||||
PART_RADIO_DISABLED,
|
||||
|
||||
PART_CHECK_NORMAL,
|
||||
PART_CHECK_SELECTED,
|
||||
PART_CHECK_DISABLED,
|
||||
|
||||
PART_CHECK_FOCUS_NW,
|
||||
PART_CHECK_FOCUS_N,
|
||||
PART_CHECK_FOCUS_NE,
|
||||
PART_CHECK_FOCUS_E,
|
||||
PART_CHECK_FOCUS_SE,
|
||||
PART_CHECK_FOCUS_S,
|
||||
PART_CHECK_FOCUS_SW,
|
||||
PART_CHECK_FOCUS_W,
|
||||
|
||||
PART_RADIO_FOCUS_NW,
|
||||
PART_RADIO_FOCUS_N,
|
||||
PART_RADIO_FOCUS_NE,
|
||||
PART_RADIO_FOCUS_E,
|
||||
PART_RADIO_FOCUS_SE,
|
||||
PART_RADIO_FOCUS_S,
|
||||
PART_RADIO_FOCUS_SW,
|
||||
PART_RADIO_FOCUS_W,
|
||||
|
||||
PART_BUTTON_NORMAL_NW,
|
||||
PART_BUTTON_NORMAL_N,
|
||||
PART_BUTTON_NORMAL_NE,
|
||||
PART_BUTTON_NORMAL_E,
|
||||
PART_BUTTON_NORMAL_SE,
|
||||
PART_BUTTON_NORMAL_S,
|
||||
PART_BUTTON_NORMAL_SW,
|
||||
PART_BUTTON_NORMAL_W,
|
||||
|
||||
PART_BUTTON_HOT_NW,
|
||||
PART_BUTTON_HOT_N,
|
||||
PART_BUTTON_HOT_NE,
|
||||
PART_BUTTON_HOT_E,
|
||||
PART_BUTTON_HOT_SE,
|
||||
PART_BUTTON_HOT_S,
|
||||
PART_BUTTON_HOT_SW,
|
||||
PART_BUTTON_HOT_W,
|
||||
|
||||
PART_BUTTON_FOCUSED_NW,
|
||||
PART_BUTTON_FOCUSED_N,
|
||||
PART_BUTTON_FOCUSED_NE,
|
||||
PART_BUTTON_FOCUSED_E,
|
||||
PART_BUTTON_FOCUSED_SE,
|
||||
PART_BUTTON_FOCUSED_S,
|
||||
PART_BUTTON_FOCUSED_SW,
|
||||
PART_BUTTON_FOCUSED_W,
|
||||
|
||||
PART_BUTTON_SELECTED_NW,
|
||||
PART_BUTTON_SELECTED_N,
|
||||
PART_BUTTON_SELECTED_NE,
|
||||
PART_BUTTON_SELECTED_E,
|
||||
PART_BUTTON_SELECTED_SE,
|
||||
PART_BUTTON_SELECTED_S,
|
||||
PART_BUTTON_SELECTED_SW,
|
||||
PART_BUTTON_SELECTED_W,
|
||||
|
||||
PART_SUNKEN_NORMAL_NW,
|
||||
PART_SUNKEN_NORMAL_N,
|
||||
PART_SUNKEN_NORMAL_NE,
|
||||
PART_SUNKEN_NORMAL_E,
|
||||
PART_SUNKEN_NORMAL_SE,
|
||||
PART_SUNKEN_NORMAL_S,
|
||||
PART_SUNKEN_NORMAL_SW,
|
||||
PART_SUNKEN_NORMAL_W,
|
||||
|
||||
PART_SUNKEN_FOCUSED_NW,
|
||||
PART_SUNKEN_FOCUSED_N,
|
||||
PART_SUNKEN_FOCUSED_NE,
|
||||
PART_SUNKEN_FOCUSED_E,
|
||||
PART_SUNKEN_FOCUSED_SE,
|
||||
PART_SUNKEN_FOCUSED_S,
|
||||
PART_SUNKEN_FOCUSED_SW,
|
||||
PART_SUNKEN_FOCUSED_W,
|
||||
|
||||
PART_SUNKEN2_NORMAL_NW,
|
||||
PART_SUNKEN2_NORMAL_N,
|
||||
PART_SUNKEN2_NORMAL_NE,
|
||||
PART_SUNKEN2_NORMAL_E,
|
||||
PART_SUNKEN2_NORMAL_SE,
|
||||
PART_SUNKEN2_NORMAL_S,
|
||||
PART_SUNKEN2_NORMAL_SW,
|
||||
PART_SUNKEN2_NORMAL_W,
|
||||
|
||||
PART_SUNKEN2_FOCUSED_NW,
|
||||
PART_SUNKEN2_FOCUSED_N,
|
||||
PART_SUNKEN2_FOCUSED_NE,
|
||||
PART_SUNKEN2_FOCUSED_E,
|
||||
PART_SUNKEN2_FOCUSED_SE,
|
||||
PART_SUNKEN2_FOCUSED_S,
|
||||
PART_SUNKEN2_FOCUSED_SW,
|
||||
PART_SUNKEN2_FOCUSED_W,
|
||||
|
||||
PART_WINDOW_NW,
|
||||
PART_WINDOW_N,
|
||||
PART_WINDOW_NE,
|
||||
PART_WINDOW_E,
|
||||
PART_WINDOW_SE,
|
||||
PART_WINDOW_S,
|
||||
PART_WINDOW_SW,
|
||||
PART_WINDOW_W,
|
||||
|
||||
PART_MENU_NW,
|
||||
PART_MENU_N,
|
||||
PART_MENU_NE,
|
||||
PART_MENU_E,
|
||||
PART_MENU_SE,
|
||||
PART_MENU_S,
|
||||
PART_MENU_SW,
|
||||
PART_MENU_W,
|
||||
|
||||
PART_WINDOW_CLOSE_BUTTON_NORMAL,
|
||||
PART_WINDOW_CLOSE_BUTTON_HOT,
|
||||
PART_WINDOW_CLOSE_BUTTON_SELECTED,
|
||||
|
||||
PART_SLIDER_FULL_NW,
|
||||
PART_SLIDER_FULL_N,
|
||||
PART_SLIDER_FULL_NE,
|
||||
PART_SLIDER_FULL_E,
|
||||
PART_SLIDER_FULL_SE,
|
||||
PART_SLIDER_FULL_S,
|
||||
PART_SLIDER_FULL_SW,
|
||||
PART_SLIDER_FULL_W,
|
||||
|
||||
PART_SLIDER_EMPTY_NW,
|
||||
PART_SLIDER_EMPTY_N,
|
||||
PART_SLIDER_EMPTY_NE,
|
||||
PART_SLIDER_EMPTY_E,
|
||||
PART_SLIDER_EMPTY_SE,
|
||||
PART_SLIDER_EMPTY_S,
|
||||
PART_SLIDER_EMPTY_SW,
|
||||
PART_SLIDER_EMPTY_W,
|
||||
|
||||
PART_SLIDER_FULL_FOCUSED_NW,
|
||||
PART_SLIDER_FULL_FOCUSED_N,
|
||||
PART_SLIDER_FULL_FOCUSED_NE,
|
||||
PART_SLIDER_FULL_FOCUSED_E,
|
||||
PART_SLIDER_FULL_FOCUSED_SE,
|
||||
PART_SLIDER_FULL_FOCUSED_S,
|
||||
PART_SLIDER_FULL_FOCUSED_SW,
|
||||
PART_SLIDER_FULL_FOCUSED_W,
|
||||
|
||||
PART_SLIDER_EMPTY_FOCUSED_NW,
|
||||
PART_SLIDER_EMPTY_FOCUSED_N,
|
||||
PART_SLIDER_EMPTY_FOCUSED_NE,
|
||||
PART_SLIDER_EMPTY_FOCUSED_E,
|
||||
PART_SLIDER_EMPTY_FOCUSED_SE,
|
||||
PART_SLIDER_EMPTY_FOCUSED_S,
|
||||
PART_SLIDER_EMPTY_FOCUSED_SW,
|
||||
PART_SLIDER_EMPTY_FOCUSED_W,
|
||||
|
||||
PART_MINI_SLIDER_FULL_NW,
|
||||
PART_MINI_SLIDER_FULL_N,
|
||||
PART_MINI_SLIDER_FULL_NE,
|
||||
PART_MINI_SLIDER_FULL_E,
|
||||
PART_MINI_SLIDER_FULL_SE,
|
||||
PART_MINI_SLIDER_FULL_S,
|
||||
PART_MINI_SLIDER_FULL_SW,
|
||||
PART_MINI_SLIDER_FULL_W,
|
||||
|
||||
PART_MINI_SLIDER_EMPTY_NW,
|
||||
PART_MINI_SLIDER_EMPTY_N,
|
||||
PART_MINI_SLIDER_EMPTY_NE,
|
||||
PART_MINI_SLIDER_EMPTY_E,
|
||||
PART_MINI_SLIDER_EMPTY_SE,
|
||||
PART_MINI_SLIDER_EMPTY_S,
|
||||
PART_MINI_SLIDER_EMPTY_SW,
|
||||
PART_MINI_SLIDER_EMPTY_W,
|
||||
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_NW,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_N,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_NE,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_E,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_SE,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_S,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_SW,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_W,
|
||||
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_NW,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_N,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_NE,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_E,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_SE,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_S,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_SW,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_W,
|
||||
|
||||
PART_MINI_SLIDER_THUMB,
|
||||
PART_MINI_SLIDER_THUMB_FOCUSED,
|
||||
|
||||
PART_SEPARATOR_HORZ,
|
||||
PART_SEPARATOR_VERT,
|
||||
|
||||
PART_COMBOBOX_ARROW,
|
||||
|
||||
PART_TOOLBUTTON_NORMAL_NW,
|
||||
PART_TOOLBUTTON_NORMAL_N,
|
||||
PART_TOOLBUTTON_NORMAL_NE,
|
||||
PART_TOOLBUTTON_NORMAL_E,
|
||||
PART_TOOLBUTTON_NORMAL_SE,
|
||||
PART_TOOLBUTTON_NORMAL_S,
|
||||
PART_TOOLBUTTON_NORMAL_SW,
|
||||
PART_TOOLBUTTON_NORMAL_W,
|
||||
|
||||
PART_TOOLBUTTON_HOT_NW,
|
||||
PART_TOOLBUTTON_HOT_N,
|
||||
PART_TOOLBUTTON_HOT_NE,
|
||||
PART_TOOLBUTTON_HOT_E,
|
||||
PART_TOOLBUTTON_HOT_SE,
|
||||
PART_TOOLBUTTON_HOT_S,
|
||||
PART_TOOLBUTTON_HOT_SW,
|
||||
PART_TOOLBUTTON_HOT_W,
|
||||
|
||||
PART_TOOLBUTTON_LAST_NW,
|
||||
PART_TOOLBUTTON_LAST_N,
|
||||
PART_TOOLBUTTON_LAST_NE,
|
||||
PART_TOOLBUTTON_LAST_E,
|
||||
PART_TOOLBUTTON_LAST_SE,
|
||||
PART_TOOLBUTTON_LAST_S,
|
||||
PART_TOOLBUTTON_LAST_SW,
|
||||
PART_TOOLBUTTON_LAST_W,
|
||||
|
||||
PART_TAB_NORMAL_NW,
|
||||
PART_TAB_NORMAL_N,
|
||||
PART_TAB_NORMAL_NE,
|
||||
PART_TAB_NORMAL_E,
|
||||
PART_TAB_NORMAL_SE,
|
||||
PART_TAB_NORMAL_S,
|
||||
PART_TAB_NORMAL_SW,
|
||||
PART_TAB_NORMAL_W,
|
||||
|
||||
PART_TAB_SELECTED_NW,
|
||||
PART_TAB_SELECTED_N,
|
||||
PART_TAB_SELECTED_NE,
|
||||
PART_TAB_SELECTED_E,
|
||||
PART_TAB_SELECTED_SE,
|
||||
PART_TAB_SELECTED_S,
|
||||
PART_TAB_SELECTED_SW,
|
||||
PART_TAB_SELECTED_W,
|
||||
|
||||
PART_TAB_BOTTOM_SELECTED_NW,
|
||||
PART_TAB_BOTTOM_SELECTED_N,
|
||||
PART_TAB_BOTTOM_SELECTED_NE,
|
||||
PART_TAB_BOTTOM_SELECTED_E,
|
||||
PART_TAB_BOTTOM_SELECTED_SE,
|
||||
PART_TAB_BOTTOM_SELECTED_S,
|
||||
PART_TAB_BOTTOM_SELECTED_SW,
|
||||
PART_TAB_BOTTOM_SELECTED_W,
|
||||
|
||||
PART_TAB_BOTTOM_NORMAL,
|
||||
|
||||
PART_TAB_FILLER,
|
||||
|
||||
PART_EDITOR_NORMAL_NW,
|
||||
PART_EDITOR_NORMAL_N,
|
||||
PART_EDITOR_NORMAL_NE,
|
||||
PART_EDITOR_NORMAL_E,
|
||||
PART_EDITOR_NORMAL_SE,
|
||||
PART_EDITOR_NORMAL_S,
|
||||
PART_EDITOR_NORMAL_SW,
|
||||
PART_EDITOR_NORMAL_W,
|
||||
|
||||
PART_EDITOR_SELECTED_NW,
|
||||
PART_EDITOR_SELECTED_N,
|
||||
PART_EDITOR_SELECTED_NE,
|
||||
PART_EDITOR_SELECTED_E,
|
||||
PART_EDITOR_SELECTED_SE,
|
||||
PART_EDITOR_SELECTED_S,
|
||||
PART_EDITOR_SELECTED_SW,
|
||||
PART_EDITOR_SELECTED_W,
|
||||
|
||||
PART_COLORBAR_0_NW,
|
||||
PART_COLORBAR_0_N,
|
||||
PART_COLORBAR_0_NE,
|
||||
PART_COLORBAR_0_E,
|
||||
PART_COLORBAR_0_SE,
|
||||
PART_COLORBAR_0_S,
|
||||
PART_COLORBAR_0_SW,
|
||||
PART_COLORBAR_0_W,
|
||||
|
||||
PART_COLORBAR_1_NW,
|
||||
PART_COLORBAR_1_N,
|
||||
PART_COLORBAR_1_NE,
|
||||
PART_COLORBAR_1_E,
|
||||
PART_COLORBAR_1_SE,
|
||||
PART_COLORBAR_1_S,
|
||||
PART_COLORBAR_1_SW,
|
||||
PART_COLORBAR_1_W,
|
||||
|
||||
PART_COLORBAR_2_NW,
|
||||
PART_COLORBAR_2_N,
|
||||
PART_COLORBAR_2_NE,
|
||||
PART_COLORBAR_2_E,
|
||||
PART_COLORBAR_2_SE,
|
||||
PART_COLORBAR_2_S,
|
||||
PART_COLORBAR_2_SW,
|
||||
PART_COLORBAR_2_W,
|
||||
|
||||
PART_COLORBAR_3_NW,
|
||||
PART_COLORBAR_3_N,
|
||||
PART_COLORBAR_3_NE,
|
||||
PART_COLORBAR_3_E,
|
||||
PART_COLORBAR_3_SE,
|
||||
PART_COLORBAR_3_S,
|
||||
PART_COLORBAR_3_SW,
|
||||
PART_COLORBAR_3_W,
|
||||
|
||||
PART_COLORBAR_BORDER_FG_NW,
|
||||
PART_COLORBAR_BORDER_FG_N,
|
||||
PART_COLORBAR_BORDER_FG_NE,
|
||||
PART_COLORBAR_BORDER_FG_E,
|
||||
PART_COLORBAR_BORDER_FG_SE,
|
||||
PART_COLORBAR_BORDER_FG_S,
|
||||
PART_COLORBAR_BORDER_FG_SW,
|
||||
PART_COLORBAR_BORDER_FG_W,
|
||||
|
||||
PART_COLORBAR_BORDER_BG_NW,
|
||||
PART_COLORBAR_BORDER_BG_N,
|
||||
PART_COLORBAR_BORDER_BG_NE,
|
||||
PART_COLORBAR_BORDER_BG_E,
|
||||
PART_COLORBAR_BORDER_BG_SE,
|
||||
PART_COLORBAR_BORDER_BG_S,
|
||||
PART_COLORBAR_BORDER_BG_SW,
|
||||
PART_COLORBAR_BORDER_BG_W,
|
||||
|
||||
PART_COLORBAR_BORDER_HOTFG_NW,
|
||||
PART_COLORBAR_BORDER_HOTFG_N,
|
||||
PART_COLORBAR_BORDER_HOTFG_NE,
|
||||
PART_COLORBAR_BORDER_HOTFG_E,
|
||||
PART_COLORBAR_BORDER_HOTFG_SE,
|
||||
PART_COLORBAR_BORDER_HOTFG_S,
|
||||
PART_COLORBAR_BORDER_HOTFG_SW,
|
||||
PART_COLORBAR_BORDER_HOTFG_W,
|
||||
|
||||
PART_SCROLLBAR_BG_NW,
|
||||
PART_SCROLLBAR_BG_N,
|
||||
PART_SCROLLBAR_BG_NE,
|
||||
PART_SCROLLBAR_BG_E,
|
||||
PART_SCROLLBAR_BG_SE,
|
||||
PART_SCROLLBAR_BG_S,
|
||||
PART_SCROLLBAR_BG_SW,
|
||||
PART_SCROLLBAR_BG_W,
|
||||
|
||||
PART_SCROLLBAR_THUMB_NW,
|
||||
PART_SCROLLBAR_THUMB_N,
|
||||
PART_SCROLLBAR_THUMB_NE,
|
||||
PART_SCROLLBAR_THUMB_E,
|
||||
PART_SCROLLBAR_THUMB_SE,
|
||||
PART_SCROLLBAR_THUMB_S,
|
||||
PART_SCROLLBAR_THUMB_SW,
|
||||
PART_SCROLLBAR_THUMB_W,
|
||||
|
||||
PART_TOOLTIP_NW,
|
||||
PART_TOOLTIP_N,
|
||||
PART_TOOLTIP_NE,
|
||||
PART_TOOLTIP_E,
|
||||
PART_TOOLTIP_SE,
|
||||
PART_TOOLTIP_S,
|
||||
PART_TOOLTIP_SW,
|
||||
PART_TOOLTIP_W,
|
||||
|
||||
PART_TOOLTIP_ARROW_NW,
|
||||
PART_TOOLTIP_ARROW_N,
|
||||
PART_TOOLTIP_ARROW_NE,
|
||||
PART_TOOLTIP_ARROW_E,
|
||||
PART_TOOLTIP_ARROW_SE,
|
||||
PART_TOOLTIP_ARROW_S,
|
||||
PART_TOOLTIP_ARROW_SW,
|
||||
PART_TOOLTIP_ARROW_W,
|
||||
|
||||
PARTS
|
||||
};
|
||||
|
||||
#endif
|
@ -142,6 +142,8 @@ SkinTheme::SkinTheme()
|
||||
sheet_mapping["colorbar_border_hotfg"] = PART_COLORBAR_BORDER_HOTFG_NW;
|
||||
sheet_mapping["scrollbar_bg"] = PART_SCROLLBAR_BG_NW;
|
||||
sheet_mapping["scrollbar_thumb"] = PART_SCROLLBAR_THUMB_NW;
|
||||
sheet_mapping["tooltip"] = PART_TOOLTIP_NW;
|
||||
sheet_mapping["tooltip_arrow"] = PART_TOOLTIP_ARROW_NW;
|
||||
|
||||
reload_skin();
|
||||
}
|
||||
@ -1476,6 +1478,19 @@ void SkinTheme::draw_frame_button(ButtonBase* widget, JRect clip)
|
||||
draw_trans_sprite(ji_screen, m_part[part], widget->rc->x1, widget->rc->y1);
|
||||
}
|
||||
|
||||
void SkinTheme::paintTooltip(PaintEvent& ev)
|
||||
{
|
||||
TipWindow* widget = static_cast<TipWindow*>(ev.getSource());
|
||||
Graphics* g = ev.getGraphics();
|
||||
gfx::Rect pos = widget->getClientBounds();
|
||||
int bg = makecol(255, 255, 125);
|
||||
|
||||
draw_bounds_nw(g, pos, PART_TOOLTIP_NW, bg);
|
||||
pos.shrink(widget->getBorder());
|
||||
|
||||
g->drawString(widget->getText(), ji_color_foreground(), bg, pos, widget->getAlign());
|
||||
}
|
||||
|
||||
int SkinTheme::get_bg_color(JWidget widget)
|
||||
{
|
||||
int c = jwidget_get_bg_color(widget);
|
||||
|
@ -29,368 +29,7 @@
|
||||
|
||||
class Graphics;
|
||||
|
||||
// Available parts in the skin sheet
|
||||
enum {
|
||||
|
||||
PART_RADIO_NORMAL,
|
||||
PART_RADIO_SELECTED,
|
||||
PART_RADIO_DISABLED,
|
||||
|
||||
PART_CHECK_NORMAL,
|
||||
PART_CHECK_SELECTED,
|
||||
PART_CHECK_DISABLED,
|
||||
|
||||
PART_CHECK_FOCUS_NW,
|
||||
PART_CHECK_FOCUS_N,
|
||||
PART_CHECK_FOCUS_NE,
|
||||
PART_CHECK_FOCUS_E,
|
||||
PART_CHECK_FOCUS_SE,
|
||||
PART_CHECK_FOCUS_S,
|
||||
PART_CHECK_FOCUS_SW,
|
||||
PART_CHECK_FOCUS_W,
|
||||
|
||||
PART_RADIO_FOCUS_NW,
|
||||
PART_RADIO_FOCUS_N,
|
||||
PART_RADIO_FOCUS_NE,
|
||||
PART_RADIO_FOCUS_E,
|
||||
PART_RADIO_FOCUS_SE,
|
||||
PART_RADIO_FOCUS_S,
|
||||
PART_RADIO_FOCUS_SW,
|
||||
PART_RADIO_FOCUS_W,
|
||||
|
||||
PART_BUTTON_NORMAL_NW,
|
||||
PART_BUTTON_NORMAL_N,
|
||||
PART_BUTTON_NORMAL_NE,
|
||||
PART_BUTTON_NORMAL_E,
|
||||
PART_BUTTON_NORMAL_SE,
|
||||
PART_BUTTON_NORMAL_S,
|
||||
PART_BUTTON_NORMAL_SW,
|
||||
PART_BUTTON_NORMAL_W,
|
||||
|
||||
PART_BUTTON_HOT_NW,
|
||||
PART_BUTTON_HOT_N,
|
||||
PART_BUTTON_HOT_NE,
|
||||
PART_BUTTON_HOT_E,
|
||||
PART_BUTTON_HOT_SE,
|
||||
PART_BUTTON_HOT_S,
|
||||
PART_BUTTON_HOT_SW,
|
||||
PART_BUTTON_HOT_W,
|
||||
|
||||
PART_BUTTON_FOCUSED_NW,
|
||||
PART_BUTTON_FOCUSED_N,
|
||||
PART_BUTTON_FOCUSED_NE,
|
||||
PART_BUTTON_FOCUSED_E,
|
||||
PART_BUTTON_FOCUSED_SE,
|
||||
PART_BUTTON_FOCUSED_S,
|
||||
PART_BUTTON_FOCUSED_SW,
|
||||
PART_BUTTON_FOCUSED_W,
|
||||
|
||||
PART_BUTTON_SELECTED_NW,
|
||||
PART_BUTTON_SELECTED_N,
|
||||
PART_BUTTON_SELECTED_NE,
|
||||
PART_BUTTON_SELECTED_E,
|
||||
PART_BUTTON_SELECTED_SE,
|
||||
PART_BUTTON_SELECTED_S,
|
||||
PART_BUTTON_SELECTED_SW,
|
||||
PART_BUTTON_SELECTED_W,
|
||||
|
||||
PART_SUNKEN_NORMAL_NW,
|
||||
PART_SUNKEN_NORMAL_N,
|
||||
PART_SUNKEN_NORMAL_NE,
|
||||
PART_SUNKEN_NORMAL_E,
|
||||
PART_SUNKEN_NORMAL_SE,
|
||||
PART_SUNKEN_NORMAL_S,
|
||||
PART_SUNKEN_NORMAL_SW,
|
||||
PART_SUNKEN_NORMAL_W,
|
||||
|
||||
PART_SUNKEN_FOCUSED_NW,
|
||||
PART_SUNKEN_FOCUSED_N,
|
||||
PART_SUNKEN_FOCUSED_NE,
|
||||
PART_SUNKEN_FOCUSED_E,
|
||||
PART_SUNKEN_FOCUSED_SE,
|
||||
PART_SUNKEN_FOCUSED_S,
|
||||
PART_SUNKEN_FOCUSED_SW,
|
||||
PART_SUNKEN_FOCUSED_W,
|
||||
|
||||
PART_SUNKEN2_NORMAL_NW,
|
||||
PART_SUNKEN2_NORMAL_N,
|
||||
PART_SUNKEN2_NORMAL_NE,
|
||||
PART_SUNKEN2_NORMAL_E,
|
||||
PART_SUNKEN2_NORMAL_SE,
|
||||
PART_SUNKEN2_NORMAL_S,
|
||||
PART_SUNKEN2_NORMAL_SW,
|
||||
PART_SUNKEN2_NORMAL_W,
|
||||
|
||||
PART_SUNKEN2_FOCUSED_NW,
|
||||
PART_SUNKEN2_FOCUSED_N,
|
||||
PART_SUNKEN2_FOCUSED_NE,
|
||||
PART_SUNKEN2_FOCUSED_E,
|
||||
PART_SUNKEN2_FOCUSED_SE,
|
||||
PART_SUNKEN2_FOCUSED_S,
|
||||
PART_SUNKEN2_FOCUSED_SW,
|
||||
PART_SUNKEN2_FOCUSED_W,
|
||||
|
||||
PART_WINDOW_NW,
|
||||
PART_WINDOW_N,
|
||||
PART_WINDOW_NE,
|
||||
PART_WINDOW_E,
|
||||
PART_WINDOW_SE,
|
||||
PART_WINDOW_S,
|
||||
PART_WINDOW_SW,
|
||||
PART_WINDOW_W,
|
||||
|
||||
PART_MENU_NW,
|
||||
PART_MENU_N,
|
||||
PART_MENU_NE,
|
||||
PART_MENU_E,
|
||||
PART_MENU_SE,
|
||||
PART_MENU_S,
|
||||
PART_MENU_SW,
|
||||
PART_MENU_W,
|
||||
|
||||
PART_WINDOW_CLOSE_BUTTON_NORMAL,
|
||||
PART_WINDOW_CLOSE_BUTTON_HOT,
|
||||
PART_WINDOW_CLOSE_BUTTON_SELECTED,
|
||||
|
||||
PART_SLIDER_FULL_NW,
|
||||
PART_SLIDER_FULL_N,
|
||||
PART_SLIDER_FULL_NE,
|
||||
PART_SLIDER_FULL_E,
|
||||
PART_SLIDER_FULL_SE,
|
||||
PART_SLIDER_FULL_S,
|
||||
PART_SLIDER_FULL_SW,
|
||||
PART_SLIDER_FULL_W,
|
||||
|
||||
PART_SLIDER_EMPTY_NW,
|
||||
PART_SLIDER_EMPTY_N,
|
||||
PART_SLIDER_EMPTY_NE,
|
||||
PART_SLIDER_EMPTY_E,
|
||||
PART_SLIDER_EMPTY_SE,
|
||||
PART_SLIDER_EMPTY_S,
|
||||
PART_SLIDER_EMPTY_SW,
|
||||
PART_SLIDER_EMPTY_W,
|
||||
|
||||
PART_SLIDER_FULL_FOCUSED_NW,
|
||||
PART_SLIDER_FULL_FOCUSED_N,
|
||||
PART_SLIDER_FULL_FOCUSED_NE,
|
||||
PART_SLIDER_FULL_FOCUSED_E,
|
||||
PART_SLIDER_FULL_FOCUSED_SE,
|
||||
PART_SLIDER_FULL_FOCUSED_S,
|
||||
PART_SLIDER_FULL_FOCUSED_SW,
|
||||
PART_SLIDER_FULL_FOCUSED_W,
|
||||
|
||||
PART_SLIDER_EMPTY_FOCUSED_NW,
|
||||
PART_SLIDER_EMPTY_FOCUSED_N,
|
||||
PART_SLIDER_EMPTY_FOCUSED_NE,
|
||||
PART_SLIDER_EMPTY_FOCUSED_E,
|
||||
PART_SLIDER_EMPTY_FOCUSED_SE,
|
||||
PART_SLIDER_EMPTY_FOCUSED_S,
|
||||
PART_SLIDER_EMPTY_FOCUSED_SW,
|
||||
PART_SLIDER_EMPTY_FOCUSED_W,
|
||||
|
||||
PART_MINI_SLIDER_FULL_NW,
|
||||
PART_MINI_SLIDER_FULL_N,
|
||||
PART_MINI_SLIDER_FULL_NE,
|
||||
PART_MINI_SLIDER_FULL_E,
|
||||
PART_MINI_SLIDER_FULL_SE,
|
||||
PART_MINI_SLIDER_FULL_S,
|
||||
PART_MINI_SLIDER_FULL_SW,
|
||||
PART_MINI_SLIDER_FULL_W,
|
||||
|
||||
PART_MINI_SLIDER_EMPTY_NW,
|
||||
PART_MINI_SLIDER_EMPTY_N,
|
||||
PART_MINI_SLIDER_EMPTY_NE,
|
||||
PART_MINI_SLIDER_EMPTY_E,
|
||||
PART_MINI_SLIDER_EMPTY_SE,
|
||||
PART_MINI_SLIDER_EMPTY_S,
|
||||
PART_MINI_SLIDER_EMPTY_SW,
|
||||
PART_MINI_SLIDER_EMPTY_W,
|
||||
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_NW,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_N,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_NE,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_E,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_SE,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_S,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_SW,
|
||||
PART_MINI_SLIDER_FULL_FOCUSED_W,
|
||||
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_NW,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_N,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_NE,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_E,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_SE,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_S,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_SW,
|
||||
PART_MINI_SLIDER_EMPTY_FOCUSED_W,
|
||||
|
||||
PART_MINI_SLIDER_THUMB,
|
||||
PART_MINI_SLIDER_THUMB_FOCUSED,
|
||||
|
||||
PART_SEPARATOR_HORZ,
|
||||
PART_SEPARATOR_VERT,
|
||||
|
||||
PART_COMBOBOX_ARROW,
|
||||
|
||||
PART_TOOLBUTTON_NORMAL_NW,
|
||||
PART_TOOLBUTTON_NORMAL_N,
|
||||
PART_TOOLBUTTON_NORMAL_NE,
|
||||
PART_TOOLBUTTON_NORMAL_E,
|
||||
PART_TOOLBUTTON_NORMAL_SE,
|
||||
PART_TOOLBUTTON_NORMAL_S,
|
||||
PART_TOOLBUTTON_NORMAL_SW,
|
||||
PART_TOOLBUTTON_NORMAL_W,
|
||||
|
||||
PART_TOOLBUTTON_HOT_NW,
|
||||
PART_TOOLBUTTON_HOT_N,
|
||||
PART_TOOLBUTTON_HOT_NE,
|
||||
PART_TOOLBUTTON_HOT_E,
|
||||
PART_TOOLBUTTON_HOT_SE,
|
||||
PART_TOOLBUTTON_HOT_S,
|
||||
PART_TOOLBUTTON_HOT_SW,
|
||||
PART_TOOLBUTTON_HOT_W,
|
||||
|
||||
PART_TOOLBUTTON_LAST_NW,
|
||||
PART_TOOLBUTTON_LAST_N,
|
||||
PART_TOOLBUTTON_LAST_NE,
|
||||
PART_TOOLBUTTON_LAST_E,
|
||||
PART_TOOLBUTTON_LAST_SE,
|
||||
PART_TOOLBUTTON_LAST_S,
|
||||
PART_TOOLBUTTON_LAST_SW,
|
||||
PART_TOOLBUTTON_LAST_W,
|
||||
|
||||
PART_TAB_NORMAL_NW,
|
||||
PART_TAB_NORMAL_N,
|
||||
PART_TAB_NORMAL_NE,
|
||||
PART_TAB_NORMAL_E,
|
||||
PART_TAB_NORMAL_SE,
|
||||
PART_TAB_NORMAL_S,
|
||||
PART_TAB_NORMAL_SW,
|
||||
PART_TAB_NORMAL_W,
|
||||
|
||||
PART_TAB_SELECTED_NW,
|
||||
PART_TAB_SELECTED_N,
|
||||
PART_TAB_SELECTED_NE,
|
||||
PART_TAB_SELECTED_E,
|
||||
PART_TAB_SELECTED_SE,
|
||||
PART_TAB_SELECTED_S,
|
||||
PART_TAB_SELECTED_SW,
|
||||
PART_TAB_SELECTED_W,
|
||||
|
||||
PART_TAB_BOTTOM_SELECTED_NW,
|
||||
PART_TAB_BOTTOM_SELECTED_N,
|
||||
PART_TAB_BOTTOM_SELECTED_NE,
|
||||
PART_TAB_BOTTOM_SELECTED_E,
|
||||
PART_TAB_BOTTOM_SELECTED_SE,
|
||||
PART_TAB_BOTTOM_SELECTED_S,
|
||||
PART_TAB_BOTTOM_SELECTED_SW,
|
||||
PART_TAB_BOTTOM_SELECTED_W,
|
||||
|
||||
PART_TAB_BOTTOM_NORMAL,
|
||||
|
||||
PART_TAB_FILLER,
|
||||
|
||||
PART_EDITOR_NORMAL_NW,
|
||||
PART_EDITOR_NORMAL_N,
|
||||
PART_EDITOR_NORMAL_NE,
|
||||
PART_EDITOR_NORMAL_E,
|
||||
PART_EDITOR_NORMAL_SE,
|
||||
PART_EDITOR_NORMAL_S,
|
||||
PART_EDITOR_NORMAL_SW,
|
||||
PART_EDITOR_NORMAL_W,
|
||||
|
||||
PART_EDITOR_SELECTED_NW,
|
||||
PART_EDITOR_SELECTED_N,
|
||||
PART_EDITOR_SELECTED_NE,
|
||||
PART_EDITOR_SELECTED_E,
|
||||
PART_EDITOR_SELECTED_SE,
|
||||
PART_EDITOR_SELECTED_S,
|
||||
PART_EDITOR_SELECTED_SW,
|
||||
PART_EDITOR_SELECTED_W,
|
||||
|
||||
PART_COLORBAR_0_NW,
|
||||
PART_COLORBAR_0_N,
|
||||
PART_COLORBAR_0_NE,
|
||||
PART_COLORBAR_0_E,
|
||||
PART_COLORBAR_0_SE,
|
||||
PART_COLORBAR_0_S,
|
||||
PART_COLORBAR_0_SW,
|
||||
PART_COLORBAR_0_W,
|
||||
|
||||
PART_COLORBAR_1_NW,
|
||||
PART_COLORBAR_1_N,
|
||||
PART_COLORBAR_1_NE,
|
||||
PART_COLORBAR_1_E,
|
||||
PART_COLORBAR_1_SE,
|
||||
PART_COLORBAR_1_S,
|
||||
PART_COLORBAR_1_SW,
|
||||
PART_COLORBAR_1_W,
|
||||
|
||||
PART_COLORBAR_2_NW,
|
||||
PART_COLORBAR_2_N,
|
||||
PART_COLORBAR_2_NE,
|
||||
PART_COLORBAR_2_E,
|
||||
PART_COLORBAR_2_SE,
|
||||
PART_COLORBAR_2_S,
|
||||
PART_COLORBAR_2_SW,
|
||||
PART_COLORBAR_2_W,
|
||||
|
||||
PART_COLORBAR_3_NW,
|
||||
PART_COLORBAR_3_N,
|
||||
PART_COLORBAR_3_NE,
|
||||
PART_COLORBAR_3_E,
|
||||
PART_COLORBAR_3_SE,
|
||||
PART_COLORBAR_3_S,
|
||||
PART_COLORBAR_3_SW,
|
||||
PART_COLORBAR_3_W,
|
||||
|
||||
PART_COLORBAR_BORDER_FG_NW,
|
||||
PART_COLORBAR_BORDER_FG_N,
|
||||
PART_COLORBAR_BORDER_FG_NE,
|
||||
PART_COLORBAR_BORDER_FG_E,
|
||||
PART_COLORBAR_BORDER_FG_SE,
|
||||
PART_COLORBAR_BORDER_FG_S,
|
||||
PART_COLORBAR_BORDER_FG_SW,
|
||||
PART_COLORBAR_BORDER_FG_W,
|
||||
|
||||
PART_COLORBAR_BORDER_BG_NW,
|
||||
PART_COLORBAR_BORDER_BG_N,
|
||||
PART_COLORBAR_BORDER_BG_NE,
|
||||
PART_COLORBAR_BORDER_BG_E,
|
||||
PART_COLORBAR_BORDER_BG_SE,
|
||||
PART_COLORBAR_BORDER_BG_S,
|
||||
PART_COLORBAR_BORDER_BG_SW,
|
||||
PART_COLORBAR_BORDER_BG_W,
|
||||
|
||||
PART_COLORBAR_BORDER_HOTFG_NW,
|
||||
PART_COLORBAR_BORDER_HOTFG_N,
|
||||
PART_COLORBAR_BORDER_HOTFG_NE,
|
||||
PART_COLORBAR_BORDER_HOTFG_E,
|
||||
PART_COLORBAR_BORDER_HOTFG_SE,
|
||||
PART_COLORBAR_BORDER_HOTFG_S,
|
||||
PART_COLORBAR_BORDER_HOTFG_SW,
|
||||
PART_COLORBAR_BORDER_HOTFG_W,
|
||||
|
||||
PART_SCROLLBAR_BG_NW,
|
||||
PART_SCROLLBAR_BG_N,
|
||||
PART_SCROLLBAR_BG_NE,
|
||||
PART_SCROLLBAR_BG_E,
|
||||
PART_SCROLLBAR_BG_SE,
|
||||
PART_SCROLLBAR_BG_S,
|
||||
PART_SCROLLBAR_BG_SW,
|
||||
PART_SCROLLBAR_BG_W,
|
||||
|
||||
PART_SCROLLBAR_THUMB_NW,
|
||||
PART_SCROLLBAR_THUMB_N,
|
||||
PART_SCROLLBAR_THUMB_NE,
|
||||
PART_SCROLLBAR_THUMB_E,
|
||||
PART_SCROLLBAR_THUMB_SE,
|
||||
PART_SCROLLBAR_THUMB_S,
|
||||
PART_SCROLLBAR_THUMB_SW,
|
||||
PART_SCROLLBAR_THUMB_W,
|
||||
|
||||
PARTS
|
||||
};
|
||||
#include "skin_parts.h"
|
||||
|
||||
// This is the GUI theme used by ASE (which use images from data/skins
|
||||
// directory).
|
||||
@ -445,6 +84,7 @@ public:
|
||||
void draw_view_viewport(JWidget widget, JRect clip);
|
||||
void paintFrame(PaintEvent& ev);
|
||||
void draw_frame_button(ButtonBase* widget, JRect clip);
|
||||
void paintTooltip(PaintEvent& ev);
|
||||
|
||||
int get_button_normal_text_color() const { return makecol(0, 0, 0); }
|
||||
int get_button_normal_face_color() const { return makecol(198, 198, 198); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user