mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 18:00:26 +00:00
Introduce a "combobox" style to replace the way combobox entries are painted
This commit is contained in:
parent
7a338250a3
commit
b72d498070
@ -618,6 +618,10 @@
|
||||
<text color="button_selected_text" state="selected" />
|
||||
</style>
|
||||
<style id="mini_check_box" extends="check_box" font="mini" />
|
||||
<style id="combobox">
|
||||
<background-border part="sunken2_focused" state="focus" />
|
||||
<background-border part="sunken2_normal" />
|
||||
</style>
|
||||
<style id="combobox_button" extends="mini_button" padding="0">
|
||||
<icon part="combobox_arrow_down" />
|
||||
<icon part="combobox_arrow_down_selected" state="selected" />
|
||||
|
@ -1505,15 +1505,9 @@ void SkinTheme::paintComboBoxEntry(ui::PaintEvent& ev)
|
||||
Graphics* g = ev.graphics();
|
||||
Entry* widget = static_cast<Entry*>(ev.getSource());
|
||||
gfx::Rect bounds = widget->clientBounds();
|
||||
ui::Style* style = styles.combobox();
|
||||
|
||||
// Outside borders
|
||||
g->fillRect(BGCOLOR, bounds);
|
||||
|
||||
drawRect(g, bounds,
|
||||
(widget->hasFocus() ?
|
||||
parts.sunken2Focused().get():
|
||||
parts.sunken2Normal().get()));
|
||||
|
||||
paintWidget(g, widget, style, bounds);
|
||||
drawEntryText(g, widget);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user