mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-21 12:40:34 +00:00
Fix "New Frame" button for existing third-party themes (fix #4609)
We made an attempt to change the "+" character with an icon, but we cannot use an existing style to do this kind of change in themes (as third-party themes will be using the old version of the style, not the updated one). We're reverting part of the change introduced in e0ff51947a94bb20383f3fc501eb3e749c258728 to use the "+" character for this "New Frame" button in the status bar.
This commit is contained in:
parent
1ca4306f9d
commit
7b24cf2594
@ -695,9 +695,7 @@
|
|||||||
<background color="check_hot_face" state="selected" />
|
<background color="check_hot_face" state="selected" />
|
||||||
<icon part="pal_options" />
|
<icon part="pal_options" />
|
||||||
</style>
|
</style>
|
||||||
<style id="new_frame_button" extends="mini_button" padding-bottom="1">
|
<style id="new_frame_button" extends="mini_button" padding-left="2" width="11" />
|
||||||
<icon part="icon_add" />
|
|
||||||
</style>
|
|
||||||
<style id="color_button" extends="mini_button" font="mini" padding-bottom="1" />
|
<style id="color_button" extends="mini_button" font="mini" padding-bottom="1" />
|
||||||
<style id="splitter">
|
<style id="splitter">
|
||||||
<background color="face" />
|
<background color="face" />
|
||||||
|
@ -688,9 +688,7 @@
|
|||||||
<background color="check_hot_face" state="selected" />
|
<background color="check_hot_face" state="selected" />
|
||||||
<icon part="pal_options" />
|
<icon part="pal_options" />
|
||||||
</style>
|
</style>
|
||||||
<style id="new_frame_button" extends="mini_button" padding-bottom="1">
|
<style id="new_frame_button" extends="mini_button" padding-left="2" width="11" />
|
||||||
<icon part="icon_add" />
|
|
||||||
</style>
|
|
||||||
<style id="color_button" extends="mini_button" font="mini" padding-bottom="1" />
|
<style id="color_button" extends="mini_button" font="mini" padding-bottom="1" />
|
||||||
<style id="splitter">
|
<style id="splitter">
|
||||||
<background color="face" />
|
<background color="face" />
|
||||||
|
@ -695,16 +695,12 @@ StatusBar::StatusBar(TooltipManager* tooltipManager)
|
|||||||
|
|
||||||
// Construct the commands box
|
// Construct the commands box
|
||||||
{
|
{
|
||||||
auto theme = SkinTheme::get(this);
|
|
||||||
Box* box1 = new Box(HORIZONTAL);
|
Box* box1 = new Box(HORIZONTAL);
|
||||||
Box* box4 = new Box(HORIZONTAL);
|
Box* box4 = new Box(HORIZONTAL);
|
||||||
|
|
||||||
m_frameLabel = new Label(Strings::statusbar_tips_frame());
|
m_frameLabel = new Label(Strings::statusbar_tips_frame());
|
||||||
m_currentFrame = new GotoFrameEntry();
|
m_currentFrame = new GotoFrameEntry();
|
||||||
m_newFrame = new Button("");
|
m_newFrame = new Button("+");
|
||||||
if (!theme->parts.iconAdd())
|
|
||||||
m_newFrame->setText("+"); // Fallback for themes without the icon.
|
|
||||||
|
|
||||||
m_newFrame->Click.connect(&StatusBar::newFrame, this);
|
m_newFrame->Click.connect(&StatusBar::newFrame, this);
|
||||||
m_newFrame->RightClick.connect(&StatusBar::showNewFramePopupMenu, this);
|
m_newFrame->RightClick.connect(&StatusBar::showNewFramePopupMenu, this);
|
||||||
|
|
||||||
@ -929,7 +925,7 @@ void StatusBar::onInitTheme(ui::InitThemeEvent& ev)
|
|||||||
textHeight()+8*guiscale()));
|
textHeight()+8*guiscale()));
|
||||||
|
|
||||||
m_newFrame->setStyle(theme->styles.newFrameButton());
|
m_newFrame->setStyle(theme->styles.newFrameButton());
|
||||||
m_commandsBox->setBorder(gfx::Border(2, 2, 2, 2)*guiscale());
|
m_commandsBox->setBorder(gfx::Border(2, 1, 2, 2)*guiscale());
|
||||||
|
|
||||||
if (m_snapToGridWindow) {
|
if (m_snapToGridWindow) {
|
||||||
m_snapToGridWindow->initTheme();
|
m_snapToGridWindow->initTheme();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user