mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 21:19:18 +00:00
Adjust styles to make them work with the new buttonset
This commit is contained in:
parent
cc3c421391
commit
ea43c5f6c8
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@ -27,7 +27,7 @@
|
||||
<dim id="timeline_base_size" value="12" />
|
||||
<dim id="color_bar_buttons_height" value="16" />
|
||||
<dim id="context_bar_height" value="18" />
|
||||
<dim id="brush_type_width" value="16" />
|
||||
<dim id="brush_type_width" value="15" />
|
||||
<dim id="color_selector_bar_size" value="8" />
|
||||
</dimensions>
|
||||
<colors>
|
||||
@ -203,11 +203,11 @@
|
||||
<part id="toolbutton_hot" x="112" y="0" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" />
|
||||
<part id="toolbutton_last" x="96" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" />
|
||||
<part id="toolbutton_pushed" x="112" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" />
|
||||
<part id="buttonset_item_normal" x="96" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" />
|
||||
<part id="buttonset_item_hot" x="112" y="0" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" />
|
||||
<part id="buttonset_item_hot_focused" x="128" y="0" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" />
|
||||
<part id="buttonset_item_focused" x="128" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" />
|
||||
<part id="buttonset_item_pushed" x="112" y="16" w1="3" w2="10" w3="3" h1="3" h2="9" h3="4" />
|
||||
<part id="buttonset_item_normal" x="96" y="16" w1="3" w2="10" w3="3" h1="3" h2="8" h3="5" />
|
||||
<part id="buttonset_item_hot" x="112" y="0" w1="3" w2="10" w3="3" h1="3" h2="8" h3="5" />
|
||||
<part id="buttonset_item_hot_focused" x="128" y="0" w1="3" w2="10" w3="3" h1="3" h2="8" h3="5" />
|
||||
<part id="buttonset_item_focused" x="128" y="16" w1="3" w2="10" w3="3" h1="3" h2="8" h3="5" />
|
||||
<part id="buttonset_item_pushed" x="112" y="16" w1="3" w2="10" w3="3" h1="3" h2="8" h3="5" />
|
||||
<part id="tab_normal" x="2" y="112" w1="4" w2="5" w3="5" h1="4" h2="6" h3="2" />
|
||||
<part id="tab_active" x="16" y="112" w1="4" w2="7" w3="5" h1="4" h2="6" h3="2" />
|
||||
<part id="tab_bottom_active" x="16" y="124" w1="4" w2="7" w3="5" h1="2" h2="1" h3="2" />
|
||||
@ -421,10 +421,10 @@
|
||||
<part id="folder_icon_small" x="144" y="272" w="10" h="8" />
|
||||
<part id="folder_icon_big" x="176" y="272" w="32" h="32" />
|
||||
<part id="folder_icon_medium" x="160" y="272" w="16" h="16" />
|
||||
<part id="outline_circle" x="144" y="224" w="13" h="15" />
|
||||
<part id="outline_square" x="160" y="224" w="13" h="15" />
|
||||
<part id="outline_horizontal" x="176" y="224" w="13" h="15" />
|
||||
<part id="outline_vertical" x="192" y="224" w="13" h="15" />
|
||||
<part id="outline_circle" x="144" y="226" w="13" h="13" />
|
||||
<part id="outline_square" x="160" y="226" w="13" h="13" />
|
||||
<part id="outline_horizontal" x="176" y="226" w="13" h="13" />
|
||||
<part id="outline_vertical" x="192" y="226" w="13" h="13" />
|
||||
<part id="outline_empty_pixel" x="208" y="224" w="5" h="5" />
|
||||
<part id="outline_full_pixel" x="214" y="224" w="5" h="5" />
|
||||
<part id="dynamics" x="176" y="144" w="16" h="16" />
|
||||
@ -608,7 +608,7 @@
|
||||
<icon part="radio_selected" align="left middle" x="2" state="selected" />
|
||||
<icon part="radio_disabled" align="left middle" x="2" state="disabled" />
|
||||
</style>
|
||||
<style id="mini_button">
|
||||
<style id="mini_button" padding-top="1">
|
||||
<background-border part="buttonset_item_normal" />
|
||||
<background-border part="buttonset_item_hot" state="mouse" />
|
||||
<background-border part="buttonset_item_hot" state="focus" />
|
||||
@ -618,10 +618,10 @@
|
||||
<text color="button_selected_text" state="selected" />
|
||||
</style>
|
||||
<style id="mini_check_box" extends="check_box" font="mini" />
|
||||
<style id="combobox_button" extends="mini_button">
|
||||
<icon part="combobox_arrow_down" />
|
||||
<icon part="combobox_arrow_down_selected" state="selected" />
|
||||
<icon part="combobox_arrow_down_disabled" state="disabled" />
|
||||
<style id="combobox_button" extends="mini_button" padding="0">
|
||||
<icon part="combobox_arrow_down" y="1" />
|
||||
<icon part="combobox_arrow_down_selected" state="selected" y="1" />
|
||||
<icon part="combobox_arrow_down_disabled" state="disabled" y="1" />
|
||||
</style>
|
||||
<style id="drop_down_button" extends="button">
|
||||
<background-border part="drop_down_button_left_normal" />
|
||||
@ -638,17 +638,17 @@
|
||||
<icon part="combobox_arrow_down_selected" state="selected" />
|
||||
<icon part="combobox_arrow_down_disabled" state="disabled" />
|
||||
</style>
|
||||
<style id="go_back_button" extends="mini_button">
|
||||
<style id="go_back_button" extends="mini_button" padding-top="2">
|
||||
<icon part="combobox_arrow_left" />
|
||||
<icon part="combobox_arrow_left_selected" state="selected" />
|
||||
<icon part="combobox_arrow_left_disabled" state="disabled" />
|
||||
</style>
|
||||
<style id="go_forward_button" extends="mini_button">
|
||||
<style id="go_forward_button" extends="mini_button" padding-top="2">
|
||||
<icon part="combobox_arrow_right" />
|
||||
<icon part="combobox_arrow_right_selected" state="selected" />
|
||||
<icon part="combobox_arrow_right_disabled" state="disabled" />
|
||||
</style>
|
||||
<style id="go_up_button" extends="mini_button">
|
||||
<style id="go_up_button" extends="mini_button" padding-top="2">
|
||||
<icon part="combobox_arrow_up" />
|
||||
<icon part="combobox_arrow_up_selected" state="selected" />
|
||||
<icon part="combobox_arrow_up_disabled" state="disabled" />
|
||||
@ -657,7 +657,7 @@
|
||||
<icon part="arrow_circle_cw" />
|
||||
<icon part="arrow_circle_cw_selected" state="selected" />
|
||||
</style>
|
||||
<style id="new_folder_button" extends="mini_button">
|
||||
<style id="new_folder_button" extends="mini_button" padding-top="2">
|
||||
<icon part="newfolder" />
|
||||
<icon part="newfolder_selected" state="selected" />
|
||||
</style>
|
||||
@ -752,7 +752,7 @@
|
||||
<background color="workspace" />
|
||||
</style>
|
||||
<style id="workspace_check_box" extends="check_box" padding="4">
|
||||
<text color="workspace_text" align="left middle" x="14" />
|
||||
<text color="workspace_text" align="left middle" x="14" />
|
||||
</style>
|
||||
<style id="tab">
|
||||
<background part="tab_normal" align="middle" />
|
||||
@ -1039,5 +1039,62 @@
|
||||
<newlayer />
|
||||
<text color="disabled" state="disabled" align="top" y="1" />
|
||||
</style>
|
||||
<style id="buttonset_item_text_top" extends="buttonset_item">
|
||||
<text color="button_normal_text" align="top" />
|
||||
<text color="button_hot_text" state="selected" align="top" />
|
||||
<text color="button_hot_text" state="mouse" align="top" />
|
||||
<text color="button_selected_text" state="mouse capture" align="top" />
|
||||
<text color="button_selected_text" state="capture selected" align="top" />
|
||||
<text color="background" x="1" y="1" state="disabled" align="top" />
|
||||
<newlayer />
|
||||
<text color="disabled" state="disabled" align="top" />
|
||||
</style>
|
||||
<style id="buttonset_item_text_top_icon_bottom" extends="buttonset_item_text_top" padding-top="2" padding-bottom="1">
|
||||
<icon align="bottom" />
|
||||
<icon align="bottom" state="disabled" color="disabled" />
|
||||
<icon align="bottom" state="capture selected" color="button_selected_text" />
|
||||
</style>
|
||||
<style id="new_sprite_rgb" extends="buttonset_item_text_top_icon_bottom" />
|
||||
<style id="new_sprite_grayscale" extends="buttonset_item_text_top_icon_bottom" />
|
||||
<style id="new_sprite_indexed" extends="buttonset_item_text_top_icon_bottom" />
|
||||
<style id="bg_transparent" extends="buttonset_item_text_top_icon_bottom" />
|
||||
<style id="bg_white" extends="buttonset_item_text_top_icon_bottom" />
|
||||
<style id="bg_black" extends="buttonset_item_text_top_icon_bottom" />
|
||||
<style id="dir_item" extends="buttonset_item_icon" width="18" height="20" />
|
||||
<style id="context_bar_button" extends="buttonset_item_icon" width="15" />
|
||||
<style id="context_bar_text_button" extends="buttonset_item_text" width="15" />
|
||||
<style id="brush_type" extends="context_bar_button" padding-top="1" />
|
||||
<style id="brush_type_mono" extends="context_bar_button" padding-top="1">
|
||||
<icon color="button_normal_text" />
|
||||
</style>
|
||||
<style id="pivot_field" extends="context_bar_button" padding-top="1" />
|
||||
<style id="pivot_dir" extends="buttonset_item_icon" width="17" height="19" />
|
||||
<style id="selection_mode" extends="context_bar_button" padding-top="1" />
|
||||
<style id="symmetry_field" extends="context_bar_button" padding-top="1" />
|
||||
<style id="symmetry_options" extends="context_bar_text_button" padding-left="3" padding-bottom="3" />
|
||||
<style id="pal_edit_button" extends="buttonset_item_icon" width="15" />
|
||||
<style id="pal_edit_button_hot" extends="buttonset_item" width="15">
|
||||
<background color="edit_pal_face" />
|
||||
<icon />
|
||||
<icon state="disabled" color="disabled" />
|
||||
<icon state="capture selected" color="button_selected_text" />
|
||||
</style>
|
||||
<style id="pal_button" extends="buttonset_item_icon" minwidth="15" padding-top="1" />
|
||||
<style id="debugger_button" extends="buttonset_item_icon" width="17" height="19" />
|
||||
<style id="buttonset_item_icon_mono" extends="buttonset_item_icon">
|
||||
<icon color="button_normal_text" />
|
||||
</style>
|
||||
<style id="tiles_button" extends="buttonset_item_icon" width="15">
|
||||
<icon color="button_normal_text" />
|
||||
</style>
|
||||
<style id="tiles_button_hot" extends="buttonset_item" width="15">
|
||||
<background color="edit_pal_face" />
|
||||
<newlayer />
|
||||
<icon color="button_normal_text" />
|
||||
<icon state="disabled" color="disabled" />
|
||||
<icon state="capture selected" color="button_selected_text" />
|
||||
</style>
|
||||
<style id="standard_brush" extends="buttonset_item_icon_mono" width="17" height="19" />
|
||||
<style id="outline_cell" extends="buttonset_item_icon" width="17" height="19" />
|
||||
</styles>
|
||||
</theme>
|
||||
|
@ -14,15 +14,15 @@
|
||||
<hbox filler="true" cell_hspan="2" />
|
||||
</grid>
|
||||
<buttonset columns="3" id="dir">
|
||||
<item icon="canvas_nw" />
|
||||
<item icon="canvas_n" />
|
||||
<item icon="canvas_ne" />
|
||||
<item icon="canvas_w" />
|
||||
<item icon="canvas_c" />
|
||||
<item icon="canvas_e" />
|
||||
<item icon="canvas_sw" />
|
||||
<item icon="canvas_s" />
|
||||
<item icon="canvas_se" />
|
||||
<item icon="canvas_nw" style="dir_item" />
|
||||
<item icon="canvas_n" style="dir_item" />
|
||||
<item icon="canvas_ne" style="dir_item" />
|
||||
<item icon="canvas_w" style="dir_item" />
|
||||
<item icon="canvas_c" style="dir_item" />
|
||||
<item icon="canvas_e" style="dir_item" />
|
||||
<item icon="canvas_sw" style="dir_item" />
|
||||
<item icon="canvas_s" style="dir_item" />
|
||||
<item icon="canvas_se" style="dir_item" />
|
||||
</buttonset>
|
||||
</hbox>
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
<vbox childspacing="0">
|
||||
<hbox>
|
||||
<buttonset columns="4" id="control">
|
||||
<item icon="debug_continue" tooltip="@.continue" tooltip_dir="bottom" />
|
||||
<item icon="debug_step_into" tooltip="@.step_into" tooltip_dir="bottom" />
|
||||
<item icon="debug_step_over" tooltip="@.step_over" tooltip_dir="bottom" />
|
||||
<item icon="debug_step_out" tooltip="@.step_out" tooltip_dir="bottom" />
|
||||
<item icon="debug_continue" style="debugger_button" tooltip="@.continue" tooltip_dir="bottom" />
|
||||
<item icon="debug_step_into" style="debugger_button" tooltip="@.step_into" tooltip_dir="bottom" />
|
||||
<item icon="debug_step_over" style="debugger_button" tooltip="@.step_over" tooltip_dir="bottom" />
|
||||
<item icon="debug_step_out" style="debugger_button" tooltip="@.step_out" tooltip_dir="bottom" />
|
||||
</buttonset>
|
||||
<buttonset columns="1" id="breakpoint">
|
||||
<item icon="debug_breakpoint" tooltip="@.toggle_breakpoint" tooltip_dir="bottom" />
|
||||
|
@ -16,16 +16,16 @@
|
||||
<item text="@.velocity" tooltip="@.velocity_tooltip" tooltip_dir="bottom" />
|
||||
|
||||
<item text="@.size" tooltip="@.size_tooltip" tooltip_dir="right" />
|
||||
<item text="" minheight="1" maxheight="1" />
|
||||
<item text="" minheight="1" maxheight="1" />
|
||||
<item minheight="1" maxheight="1" />
|
||||
<item minheight="1" maxheight="1" />
|
||||
|
||||
<item text="@.angle" tooltip="@.angle_tooltip" tooltip_dir="right" />
|
||||
<item text="" minheight="1" maxheight="1" />
|
||||
<item text="" minheight="1" maxheight="1" />
|
||||
<item minheight="1" maxheight="1" />
|
||||
<item minheight="1" maxheight="1" />
|
||||
|
||||
<item text="@.gradient" tooltip="@.gradient_tooltip" tooltip_dir="right" />
|
||||
<item text="" minheight="1" maxheight="1" />
|
||||
<item text="" minheight="1" maxheight="1" />
|
||||
<item minheight="1" maxheight="1" />
|
||||
<item minheight="1" maxheight="1" />
|
||||
</buttonset>
|
||||
</hbox>
|
||||
|
||||
|
@ -67,28 +67,36 @@
|
||||
</vbox>
|
||||
<buttonset columns="3" id="drag_angle">
|
||||
<item icon="canvas_nw"
|
||||
style="dir_item"
|
||||
tooltip="@.drag_angle_tooltip"
|
||||
tooltip_dir="bottom" />
|
||||
<item icon="canvas_n"
|
||||
style="dir_item"
|
||||
tooltip="@.drag_angle_tooltip"
|
||||
tooltip_dir="bottom" />
|
||||
<item icon="canvas_ne"
|
||||
style="dir_item"
|
||||
tooltip="@.drag_angle_tooltip"
|
||||
tooltip_dir="bottom" />
|
||||
<item icon="canvas_w"
|
||||
style="dir_item"
|
||||
tooltip="@.drag_angle_tooltip"
|
||||
tooltip_dir="right" />
|
||||
<item />
|
||||
<item icon="canvas_e"
|
||||
style="dir_item"
|
||||
tooltip="@.drag_angle_tooltip"
|
||||
tooltip_dir="left" />
|
||||
<item icon="canvas_sw"
|
||||
style="dir_item"
|
||||
tooltip="@.drag_angle_tooltip"
|
||||
tooltip_dir="top" />
|
||||
<item icon="canvas_s"
|
||||
style="dir_item"
|
||||
tooltip="@.drag_angle_tooltip"
|
||||
tooltip_dir="top" />
|
||||
<item icon="canvas_se"
|
||||
style="dir_item"
|
||||
tooltip="@.drag_angle_tooltip"
|
||||
tooltip_dir="top" />
|
||||
</buttonset>
|
||||
|
@ -15,16 +15,16 @@
|
||||
|
||||
<separator text="@.color_mode" left="true" horizontal="true" />
|
||||
<buttonset columns="3" id="color_mode">
|
||||
<item text="@.rgba" icon="icon_rgb" tooltip="@.rgba_tooltip" tooltip_dir="bottom" />
|
||||
<item text="@.grayscale" icon="icon_grayscale" tooltip="@.grayscale_tooltip" tooltip_dir="bottom" />
|
||||
<item text="@.indexed" icon="icon_indexed" tooltip="@.indexed_tooltip" tooltip_dir="bottom" />
|
||||
<item text="@.rgba" icon="icon_rgb" style="new_sprite_rgb" tooltip="@.rgba_tooltip" tooltip_dir="bottom" />
|
||||
<item text="@.grayscale" icon="icon_grayscale" style="new_sprite_grayscale" tooltip="@.grayscale_tooltip" tooltip_dir="bottom" />
|
||||
<item text="@.indexed" icon="icon_indexed" style="new_sprite_indexed" tooltip="@.indexed_tooltip" tooltip_dir="bottom" />
|
||||
</buttonset>
|
||||
|
||||
<separator text="@.background" left="true" horizontal="true" />
|
||||
<buttonset columns="3" id="bg_color">
|
||||
<item text="@.transparent" icon="icon_transparent" />
|
||||
<item text="@.white" icon="icon_white" />
|
||||
<item text="@.black" icon="icon_black" />
|
||||
<item text="@.transparent" icon="icon_transparent" style="bg_transparent" />
|
||||
<item text="@.white" icon="icon_white" style="bg_white" />
|
||||
<item text="@.black" icon="icon_black" style="bg_black" />
|
||||
</buttonset>
|
||||
|
||||
<check id="advanced_check" text="@general.advanced_options" />
|
||||
|
@ -20,15 +20,15 @@
|
||||
</hbox>
|
||||
<hbox>
|
||||
<buttonset id="outline_matrix" columns="3">
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
<item icon="outline_empty_pixel" style="outline_cell" />
|
||||
</buttonset>
|
||||
</hbox>
|
||||
</vbox>
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "app/doc_api.h"
|
||||
#include "app/modules/gui.h"
|
||||
#include "app/tx.h"
|
||||
#include "app/ui/button_set.h"
|
||||
#include "app/ui/color_bar.h"
|
||||
#include "app/ui/doc_view.h"
|
||||
#include "app/ui/editor/editor.h"
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "app/i18n/strings.h"
|
||||
#include "app/modules/palettes.h"
|
||||
#include "app/pref/preferences.h"
|
||||
#include "app/ui/button_set.h"
|
||||
#include "app/ui/workspace.h"
|
||||
#include "app/ui_context.h"
|
||||
#include "app/util/clipboard.h"
|
||||
|
@ -68,6 +68,7 @@ FilterTargetButtons::FilterTargetButtons(int imgtype, bool withChannels)
|
||||
// Create the button to select which cels will be modified by the
|
||||
// filter.
|
||||
m_cels = addItem(getCelsTargetText(), 4, 1);
|
||||
initTheme();
|
||||
}
|
||||
|
||||
void FilterTargetButtons::setTarget(const int target)
|
||||
|
@ -154,7 +154,7 @@ public:
|
||||
, m_brushes(App::instance()->brushes())
|
||||
, m_slot(slot) {
|
||||
auto theme = skin::SkinTheme::get(this);
|
||||
setIcon(theme->parts.iconArrowDown(), true);
|
||||
setIcon(theme->parts.iconArrowDown());
|
||||
}
|
||||
|
||||
private:
|
||||
@ -283,7 +283,7 @@ class NewBrushOptionsItem : public ButtonSet::Item {
|
||||
public:
|
||||
NewBrushOptionsItem() {
|
||||
auto theme = skin::SkinTheme::get(this);
|
||||
setIcon(theme->parts.iconArrowDown(), true);
|
||||
setIcon(theme->parts.iconArrowDown());
|
||||
}
|
||||
|
||||
private:
|
||||
@ -362,8 +362,7 @@ BrushPopup::BrushPopup()
|
||||
for (const auto& brush : brushes.getStandardBrushes()) {
|
||||
m_standardBrushes.addItem(
|
||||
new SelectBrushItem(
|
||||
BrushSlot(BrushSlot::Flags::BrushType, brush)))
|
||||
->setMono(true);
|
||||
BrushSlot(BrushSlot::Flags::BrushType, brush)), "standard_brush");
|
||||
}
|
||||
m_standardBrushes.setTransparent(true);
|
||||
|
||||
@ -428,12 +427,13 @@ void BrushPopup::regenerate(ui::Display* display,
|
||||
}
|
||||
m_customBrushes->addItem(new SelectBrushItem(brush, slot));
|
||||
m_customBrushes->addItem(new BrushShortcutItem(shortcut, slot));
|
||||
m_customBrushes->addItem(new BrushOptionsItem(this, slot));
|
||||
m_customBrushes->addItem(new BrushOptionsItem(this, slot), "buttonset_item_icon_mono");
|
||||
}
|
||||
|
||||
m_customBrushes->addItem(new NewCustomBrushItem, 2, 1);
|
||||
m_customBrushes->addItem(new NewBrushOptionsItem);
|
||||
m_customBrushes->addItem(new NewBrushOptionsItem, "buttonset_item_icon_mono");
|
||||
m_customBrushes->setExpansive(true);
|
||||
m_customBrushes->initTheme();
|
||||
m_box.addChild(m_customBrushes);
|
||||
|
||||
// Resize the window and change the hot region.
|
||||
|
@ -186,19 +186,35 @@ ColorBar::ColorBar(int align, TooltipManager* tooltipManager)
|
||||
|
||||
auto theme = SkinTheme::get(this);
|
||||
|
||||
m_editPal.addItem(theme->parts.timelineOpenPadlockActive());
|
||||
m_buttons.addItem(theme->parts.palSort());
|
||||
m_buttons.addItem(theme->parts.palPresets());
|
||||
m_buttons.addItem(theme->parts.palOptions());
|
||||
m_tilesButton.addItem(theme->parts.tiles());
|
||||
auto item = m_editPal.addItem(theme->parts.timelineOpenPadlockActive());
|
||||
item->InitTheme.connect(
|
||||
[this, item](){
|
||||
auto style = m_editMode ? SkinTheme::instance()->styles.palEditButton() :
|
||||
SkinTheme::instance()->styles.palEditButtonHot();
|
||||
item->setStyle(style);
|
||||
});
|
||||
m_buttons.addItem(theme->parts.palSort(), "pal_button");
|
||||
m_buttons.addItem(theme->parts.palPresets(), "pal_button");
|
||||
m_buttons.addItem(theme->parts.palOptions(), "pal_button");
|
||||
item = m_tilesButton.addItem(theme->parts.tiles());
|
||||
item->InitTheme.connect(
|
||||
[this, item]() {
|
||||
|
||||
const bool canEditTiles = this->canEditTiles();
|
||||
const bool editTiles = (canEditTiles &&
|
||||
m_tilemapMode == TilemapMode::Tiles);
|
||||
auto style = editTiles ? SkinTheme::instance()->styles.tilesButtonHot() :
|
||||
SkinTheme::instance()->styles.tilesButton();
|
||||
item->setStyle(style);
|
||||
});
|
||||
|
||||
static_assert(0 == int(TilesetMode::Manual) &&
|
||||
1 == int(TilesetMode::Auto) &&
|
||||
2 == int(TilesetMode::Stack), "Tileset mode buttons doesn't match TilesetMode enum values");
|
||||
|
||||
m_tilesetModeButtons.addItem(theme->parts.tilesManual());
|
||||
m_tilesetModeButtons.addItem(theme->parts.tilesAuto());
|
||||
m_tilesetModeButtons.addItem(theme->parts.tilesStack());
|
||||
m_tilesetModeButtons.addItem(theme->parts.tilesManual(), "pal_button");
|
||||
m_tilesetModeButtons.addItem(theme->parts.tilesAuto(), "pal_button");
|
||||
m_tilesetModeButtons.addItem(theme->parts.tilesStack(), "pal_button");
|
||||
setTilesetMode(m_tilesetMode);
|
||||
|
||||
m_paletteView.setColumns(8);
|
||||
@ -520,9 +536,9 @@ void ColorBar::setEditMode(bool state)
|
||||
ButtonSet::Item* item = m_editPal.getItem(0);
|
||||
|
||||
m_editMode = state;
|
||||
item->setIcon(state ? theme->parts.timelineOpenPadlockActive():
|
||||
theme->parts.timelineClosedPadlockNormal());
|
||||
item->setHotColor(state ? theme->colors.editPalFace(): gfx::ColorNone);
|
||||
item->setIcon(state ? theme->parts.timelineClosedPadlockNormal():
|
||||
theme->parts.timelineOpenPadlockActive());
|
||||
item->initTheme();
|
||||
|
||||
// Deselect color entries when we cancel editing
|
||||
if (!state)
|
||||
@ -553,16 +569,11 @@ void ColorBar::setTilemapMode(TilemapMode mode)
|
||||
|
||||
void ColorBar::updateFromTilemapMode()
|
||||
{
|
||||
SkinTheme* theme = static_cast<SkinTheme*>(this->theme());
|
||||
ButtonSet::Item* item = m_tilesButton.getItem(0);
|
||||
|
||||
const bool canEditTiles = this->canEditTiles();
|
||||
const bool editTiles = (canEditTiles &&
|
||||
m_tilemapMode == TilemapMode::Tiles);
|
||||
|
||||
item->setHotColor(editTiles ? theme->colors.editPalFace():
|
||||
gfx::ColorNone);
|
||||
item->setMono(true);
|
||||
item->initTheme();
|
||||
|
||||
if (Preferences::instance().colorBar.showColorAndTiles()) {
|
||||
m_scrollablePalView.setVisible(true);
|
||||
|
@ -162,7 +162,7 @@ public:
|
||||
, m_brushes(App::instance()->brushes()) {
|
||||
SkinPartPtr part(new SkinPart);
|
||||
part->setBitmap(0, BrushPopup::createSurfaceForBrush(BrushRef(nullptr)));
|
||||
addItem(part);
|
||||
addItem(part, "brush_type");
|
||||
|
||||
m_popupWindow.Open.connect(
|
||||
[this]{
|
||||
@ -182,7 +182,11 @@ public:
|
||||
part->setBitmap(0, BrushPopup::createSurfaceForBrush(brush));
|
||||
|
||||
const bool mono = (brush->type() != kImageBrushType);
|
||||
getItem(0)->setIcon(part, mono);
|
||||
getItem(0)->setIcon(part);
|
||||
auto style = mono ? SkinTheme::instance()->styles.brushTypeMono() :
|
||||
SkinTheme::instance()->styles.brushType();
|
||||
getItem(0)->setStyle(style);
|
||||
|
||||
}
|
||||
|
||||
void switchPopup() {
|
||||
@ -380,7 +384,7 @@ class ContextBar::PaintBucketSettingsField : public ButtonSet {
|
||||
public:
|
||||
PaintBucketSettingsField() : ButtonSet(1) {
|
||||
auto theme = SkinTheme::get(this);
|
||||
addItem(theme->parts.timelineGear());
|
||||
addItem(theme->parts.timelineGear(), "context_bar_button");
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -466,7 +470,7 @@ public:
|
||||
InkTypeField(ContextBar* owner) : ButtonSet(1)
|
||||
, m_owner(owner) {
|
||||
auto theme = SkinTheme::get(this);
|
||||
addItem(theme->parts.inkSimple());
|
||||
addItem(theme->parts.inkSimple(), "context_bar_button");
|
||||
}
|
||||
|
||||
void setInkType(InkType inkType) {
|
||||
@ -863,7 +867,7 @@ class ContextBar::PivotField : public ButtonSet {
|
||||
public:
|
||||
PivotField()
|
||||
: ButtonSet(1) {
|
||||
addItem(SkinTheme::get(this)->parts.pivotCenter());
|
||||
addItem(SkinTheme::get(this)->parts.pivotCenter(), "pivot_field");
|
||||
|
||||
m_pivotConn = Preferences::instance().selection.pivotPosition.AfterChange.connect(
|
||||
[this]{ onPivotChange(); });
|
||||
@ -883,15 +887,15 @@ private:
|
||||
CheckBox visible(Strings::context_bar_default_display_pivot());
|
||||
HBox box;
|
||||
ButtonSet buttonset(3);
|
||||
buttonset.addItem(theme->parts.pivotNorthwest());
|
||||
buttonset.addItem(theme->parts.pivotNorth());
|
||||
buttonset.addItem(theme->parts.pivotNortheast());
|
||||
buttonset.addItem(theme->parts.pivotWest());
|
||||
buttonset.addItem(theme->parts.pivotCenter());
|
||||
buttonset.addItem(theme->parts.pivotEast());
|
||||
buttonset.addItem(theme->parts.pivotSouthwest());
|
||||
buttonset.addItem(theme->parts.pivotSouth());
|
||||
buttonset.addItem(theme->parts.pivotSoutheast());
|
||||
buttonset.addItem(theme->parts.pivotNorthwest(), "pivot_dir");
|
||||
buttonset.addItem(theme->parts.pivotNorth(), "pivot_dir");
|
||||
buttonset.addItem(theme->parts.pivotNortheast(), "pivot_dir");
|
||||
buttonset.addItem(theme->parts.pivotWest(), "pivot_dir");
|
||||
buttonset.addItem(theme->parts.pivotCenter(), "pivot_dir");
|
||||
buttonset.addItem(theme->parts.pivotEast(), "pivot_dir");
|
||||
buttonset.addItem(theme->parts.pivotSouthwest(), "pivot_dir");
|
||||
buttonset.addItem(theme->parts.pivotSouth(), "pivot_dir");
|
||||
buttonset.addItem(theme->parts.pivotSoutheast(), "pivot_dir");
|
||||
box.addChild(&buttonset);
|
||||
|
||||
menu.addChild(&visible);
|
||||
@ -902,6 +906,7 @@ private:
|
||||
app::gen::PivotPosition pos = Preferences::instance().selection.pivotPosition();
|
||||
visible.setSelected(isVisible);
|
||||
buttonset.setSelectedItem(int(pos));
|
||||
buttonset.initTheme();
|
||||
|
||||
visible.Click.connect(
|
||||
[&visible](){
|
||||
@ -1144,7 +1149,7 @@ public:
|
||||
DynamicsField(ContextBar* ctxBar)
|
||||
: ButtonSet(1)
|
||||
, m_ctxBar(ctxBar) {
|
||||
addItem(SkinTheme::get(this)->parts.dynamics());
|
||||
addItem(SkinTheme::get(this)->parts.dynamics(), "context_bar_button");
|
||||
}
|
||||
|
||||
void switchPopup() {
|
||||
@ -1276,8 +1281,8 @@ public:
|
||||
GradientTypeField() : ButtonSet(2) {
|
||||
auto theme = SkinTheme::get(this);
|
||||
|
||||
addItem(theme->parts.linearGradient());
|
||||
addItem(theme->parts.radialGradient());
|
||||
addItem(theme->parts.linearGradient(), "context_bar_button");
|
||||
addItem(theme->parts.radialGradient(), "context_bar_button");
|
||||
|
||||
setSelectedItem(0);
|
||||
}
|
||||
@ -1299,8 +1304,8 @@ public:
|
||||
DropPixelsField() : ButtonSet(2) {
|
||||
auto theme = SkinTheme::get(this);
|
||||
|
||||
addItem(theme->parts.dropPixelsOk());
|
||||
addItem(theme->parts.dropPixelsCancel());
|
||||
addItem(theme->parts.dropPixelsOk(), "context_bar_button");
|
||||
addItem(theme->parts.dropPixelsCancel(), "context_bar_button");
|
||||
setOfferCapture(false);
|
||||
}
|
||||
|
||||
@ -1407,9 +1412,9 @@ public:
|
||||
SymmetryField() : ButtonSet(3) {
|
||||
setMultiMode(MultiMode::Set);
|
||||
auto theme = SkinTheme::get(this);
|
||||
addItem(theme->parts.horizontalSymmetry());
|
||||
addItem(theme->parts.verticalSymmetry());
|
||||
addItem("...");
|
||||
addItem(theme->parts.horizontalSymmetry(), "symmetry_field");
|
||||
addItem(theme->parts.verticalSymmetry(), "symmetry_field");
|
||||
addItem("...", "symmetry_options");
|
||||
}
|
||||
|
||||
void setupTooltips(TooltipManager* tooltipManager) {
|
||||
@ -1544,8 +1549,8 @@ public:
|
||||
m_combobox.setExpansive(true);
|
||||
m_combobox.setMinSize(gfx::Size(256*guiscale(), 0));
|
||||
|
||||
m_action.addItem(theme->parts.iconUserData())->setMono(true);
|
||||
m_action.addItem(theme->parts.iconClose())->setMono(true);
|
||||
m_action.addItem(theme->parts.iconUserData(), "buttonset_item_icon_mono");
|
||||
m_action.addItem(theme->parts.iconClose(), "buttonset_item_icon_mono");
|
||||
m_action.ItemChange.connect(
|
||||
[this](ButtonSet::Item* item){
|
||||
onAction(m_action.selectedItem());
|
||||
|
@ -24,10 +24,10 @@ SelectionModeField::SelectionModeField()
|
||||
{
|
||||
auto theme = SkinTheme::get(this);
|
||||
|
||||
addItem(theme->parts.selectionReplace());
|
||||
addItem(theme->parts.selectionAdd());
|
||||
addItem(theme->parts.selectionSubtract());
|
||||
addItem(theme->parts.selectionIntersect());
|
||||
addItem(theme->parts.selectionReplace(), "selection_mode");
|
||||
addItem(theme->parts.selectionAdd(), "selection_mode");
|
||||
addItem(theme->parts.selectionSubtract(), "selection_mode");
|
||||
addItem(theme->parts.selectionIntersect(), "selection_mode");
|
||||
|
||||
setSelectedItem((int)Preferences::instance().selection.mode());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user