mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
CharacterMap+FontEditor: Switch current Unicode block on arrow press
This commit is contained in:
parent
17f9d3d45e
commit
cef595aa5c
Notes:
sideshowbarker
2024-07-17 17:57:48 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/cef595aa5c Pull-request: https://github.com/SerenityOS/serenity/pull/12864
2 changed files with 4 additions and 2 deletions
|
@ -125,7 +125,8 @@ CharacterMapWidget::CharacterMapWidget()
|
|||
};
|
||||
|
||||
auto unicode_blocks = Unicode::block_display_names();
|
||||
m_unicode_block_listview->on_activation = [this, unicode_blocks](auto& index) {
|
||||
m_unicode_block_listview->on_selection_change = [this, unicode_blocks] {
|
||||
auto index = m_unicode_block_listview->selection().first();
|
||||
if (index.row() > 0)
|
||||
m_range = unicode_blocks[index.row() - 1].code_point_range;
|
||||
else
|
||||
|
|
|
@ -454,7 +454,8 @@ FontEditorWidget::FontEditorWidget()
|
|||
m_filter_model = MUST(GUI::FilteringProxyModel::create(*m_unicode_block_model));
|
||||
m_filter_model->set_filter_term("");
|
||||
|
||||
m_unicode_block_listview->on_activation = [this, unicode_blocks](auto& index) {
|
||||
m_unicode_block_listview->on_selection_change = [this, unicode_blocks] {
|
||||
auto index = m_unicode_block_listview->selection().first();
|
||||
auto mapped_index = m_filter_model->map(index);
|
||||
if (mapped_index.row() > 0)
|
||||
m_range = unicode_blocks[mapped_index.row() - 1].code_point_range;
|
||||
|
|
Loading…
Reference in a new issue