LibGUI: Replace up and down arrows with emoji
This commit is contained in:
parent
80699a0824
commit
d18f6e82eb
Notes:
sideshowbarker
2024-07-19 06:20:01 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/d18f6e82eb9 Pull-request: https://github.com/SerenityOS/serenity/pull/2304
4 changed files with 8 additions and 8 deletions
|
@ -75,7 +75,7 @@ void AbstractTableView::update_column_sizes()
|
|||
continue;
|
||||
int header_width = header_font().width(model.column_name(column));
|
||||
if (column == key_column)
|
||||
header_width += font().width(" \xc3\xb6");
|
||||
header_width += font().width(" \xE2\xAC\x86"); // UPWARDS BLACK ARROW
|
||||
int column_width = header_width;
|
||||
for (int row = 0; row < row_count; ++row) {
|
||||
auto cell_data = model.data(model.index(row, column));
|
||||
|
@ -158,9 +158,9 @@ void AbstractTableView::paint_headers(Painter& painter)
|
|||
builder.append(model()->column_name(column_index));
|
||||
auto sort_order = model()->sort_order();
|
||||
if (sort_order == SortOrder::Ascending)
|
||||
builder.append(" \xc3\xb6");
|
||||
builder.append(" \xE2\xAC\x86"); // UPWARDS BLACK ARROW
|
||||
else if (sort_order == SortOrder::Descending)
|
||||
builder.append(" \xc3\xb7");
|
||||
builder.append(" \xE2\xAC\x87"); // DOWNWARDS BLACK ARROW
|
||||
text = builder.to_string();
|
||||
} else {
|
||||
text = model()->column_name(column_index);
|
||||
|
|
|
@ -67,7 +67,7 @@ ComboBox::ComboBox()
|
|||
};
|
||||
m_open_button = add<Button>();
|
||||
m_open_button->set_focusable(false);
|
||||
m_open_button->set_text("\xc3\xb7");
|
||||
m_open_button->set_text("\xE2\xAC\x87"); // DOWNWARDS BLACK ARROW
|
||||
m_open_button->on_click = [this](auto) {
|
||||
if (m_list_window->is_visible())
|
||||
close();
|
||||
|
|
|
@ -44,12 +44,12 @@ SpinBox::SpinBox()
|
|||
};
|
||||
m_increment_button = add<Button>();
|
||||
m_increment_button->set_focusable(false);
|
||||
m_increment_button->set_text("\xc3\xb6");
|
||||
m_increment_button->set_text("\xE2\xAC\x86"); // UPWARDS BLACK ARROW
|
||||
m_increment_button->on_click = [this](auto) { set_value(m_value + 1); };
|
||||
m_increment_button->set_auto_repeat_interval(150);
|
||||
m_decrement_button = add<Button>();
|
||||
m_decrement_button->set_focusable(false);
|
||||
m_decrement_button->set_text("\xc3\xb7");
|
||||
m_decrement_button->set_text("\xE2\xAC\x87"); // DOWNWARDS BLACK ARROW
|
||||
m_decrement_button->on_click = [this](auto) { set_value(m_value - 1); };
|
||||
m_decrement_button->set_auto_repeat_interval(150);
|
||||
}
|
||||
|
|
|
@ -211,9 +211,9 @@ void Menu::draw()
|
|||
bool can_go_up = m_scroll_offset > 0;
|
||||
bool can_go_down = m_scroll_offset < m_max_scroll_offset;
|
||||
Gfx::Rect up_indicator_rect { frame_thickness(), frame_thickness(), content_width(), item_height() };
|
||||
painter.draw_text(up_indicator_rect, "\xc3\xb6", Gfx::TextAlignment::Center, can_go_up ? palette.menu_base_text() : palette.color(ColorRole::DisabledText));
|
||||
painter.draw_text(up_indicator_rect, "\xE2\xAC\x86", Gfx::TextAlignment::Center, can_go_up ? palette.menu_base_text() : palette.color(ColorRole::DisabledText));
|
||||
Gfx::Rect down_indicator_rect { frame_thickness(), menu_window()->height() - item_height() - frame_thickness(), content_width(), item_height() };
|
||||
painter.draw_text(down_indicator_rect, "\xc3\xb7", Gfx::TextAlignment::Center, can_go_down ? palette.menu_base_text() : palette.color(ColorRole::DisabledText));
|
||||
painter.draw_text(down_indicator_rect, "\xE2\xAC\x87", Gfx::TextAlignment::Center, can_go_down ? palette.menu_base_text() : palette.color(ColorRole::DisabledText));
|
||||
}
|
||||
|
||||
for (int i = 0; i < visible_item_count; ++i) {
|
||||
|
|
Loading…
Add table
Reference in a new issue