mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 21:33:12 +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_selected_text" state="selected" />
|
||||
</style>
|
||||
<style id="shade_empty">
|
||||
<background color="editor_face" />
|
||||
<text color="status_bar_text" />
|
||||
</style>
|
||||
<style id="shade_selection">
|
||||
<background part="colorbar_selection_hot" />
|
||||
</style>
|
||||
|
@ -983,6 +983,10 @@
|
||||
<icon part="window_center_icon" color="button_hot_text" state="mouse" />
|
||||
<icon part="window_center_icon" color="button_selected_text" state="selected" />
|
||||
</style>
|
||||
<style id="shade_empty">
|
||||
<background color="editor_face" />
|
||||
<text color="face" />
|
||||
</style>
|
||||
<style id="shade_selection">
|
||||
<background part="colorbar_selection_hot" />
|
||||
</style>
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2019-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2019-2023 Igara Studio S.A.
|
||||
// Copyright (C) 2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -301,9 +301,11 @@ void ColorShades::onPaint(ui::PaintEvent& ev)
|
||||
}
|
||||
}
|
||||
else {
|
||||
g->fillRect(theme->colors.editorFace(), bounds);
|
||||
g->drawAlignedUIText(text(), theme->colors.face(), gfx::ColorNone, bounds,
|
||||
ui::CENTER | ui::MIDDLE);
|
||||
ui::PaintWidgetPartInfo info;
|
||||
const std::string& text = this->text();
|
||||
info.text = &text;
|
||||
theme->paintWidgetPart(
|
||||
g, theme->styles.shadeEmpty(), bounds, info);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user