mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 06:50:07 +00:00
Add new "shade_empty" style to paint the empty shades label (fix #4225)
This commit is contained in:
parent
ed3bbd5ebf
commit
96ef977311
@ -993,6 +993,10 @@
|
|||||||
<icon part="window_center_icon" color="button_hot_text" state="mouse" />
|
<icon part="window_center_icon" color="button_hot_text" state="mouse" />
|
||||||
<icon part="window_center_icon" color="button_selected_text" state="selected" />
|
<icon part="window_center_icon" color="button_selected_text" state="selected" />
|
||||||
</style>
|
</style>
|
||||||
|
<style id="shade_empty">
|
||||||
|
<background color="editor_face" />
|
||||||
|
<text color="status_bar_text" />
|
||||||
|
</style>
|
||||||
<style id="shade_selection">
|
<style id="shade_selection">
|
||||||
<background part="colorbar_selection_hot" />
|
<background part="colorbar_selection_hot" />
|
||||||
</style>
|
</style>
|
||||||
|
@ -983,6 +983,10 @@
|
|||||||
<icon part="window_center_icon" color="button_hot_text" state="mouse" />
|
<icon part="window_center_icon" color="button_hot_text" state="mouse" />
|
||||||
<icon part="window_center_icon" color="button_selected_text" state="selected" />
|
<icon part="window_center_icon" color="button_selected_text" state="selected" />
|
||||||
</style>
|
</style>
|
||||||
|
<style id="shade_empty">
|
||||||
|
<background color="editor_face" />
|
||||||
|
<text color="face" />
|
||||||
|
</style>
|
||||||
<style id="shade_selection">
|
<style id="shade_selection">
|
||||||
<background part="colorbar_selection_hot" />
|
<background part="colorbar_selection_hot" />
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2019-2022 Igara Studio S.A.
|
// Copyright (C) 2019-2023 Igara Studio S.A.
|
||||||
// Copyright (C) 2018 David Capello
|
// Copyright (C) 2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
@ -301,9 +301,11 @@ void ColorShades::onPaint(ui::PaintEvent& ev)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
g->fillRect(theme->colors.editorFace(), bounds);
|
ui::PaintWidgetPartInfo info;
|
||||||
g->drawAlignedUIText(text(), theme->colors.face(), gfx::ColorNone, bounds,
|
const std::string& text = this->text();
|
||||||
ui::CENTER | ui::MIDDLE);
|
info.text = &text;
|
||||||
|
theme->paintWidgetPart(
|
||||||
|
g, theme->styles.shadeEmpty(), bounds, info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user