From 8c7402d86e8444911456d14a5c042c886f0c833c Mon Sep 17 00:00:00 2001 From: Jakub Dupak Date: Mon, 17 Jun 2024 21:30:07 +0200 Subject: [PATCH] GUI: change editor highlight naming --- src/gui/mainwindow/MainWindow.ui | 22 +++++++++++----------- src/gui/mainwindow/mainwindow.cpp | 8 ++++---- src/gui/windows/editor/editordock.cpp | 4 ++-- src/gui/windows/editor/editordock.h | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/gui/mainwindow/MainWindow.ui b/src/gui/mainwindow/MainWindow.ui index fea951d3..c31c004c 100644 --- a/src/gui/mainwindow/MainWindow.ui +++ b/src/gui/mainwindow/MainWindow.ui @@ -17,7 +17,7 @@ :/icons/gui.png - :/icons/gui.png + :/icons/gui.png @@ -54,7 +54,7 @@ 0 0 900 - 32 + 31 @@ -129,8 +129,8 @@ &Options - - + + @@ -147,7 +147,7 @@ false - Qt::TopToolBarArea + Qt::ToolBarArea::TopToolBarArea TopToolBarArea @@ -613,7 +613,7 @@ Show line number in the code editor. - + true @@ -621,13 +621,13 @@ true - Enable &Highlighting + &Highlight Curent Instruction - Highlight currently executed instruction in internal editor. + Highlight currently the currently executed instruction in the internal editor. - + true @@ -635,10 +635,10 @@ true - Enable &Focus Change + &Follow Current Instruction - Focus on currently executed instruction in internal editor. + Always focus the currently executed instruction in the internal editor. diff --git a/src/gui/mainwindow/mainwindow.cpp b/src/gui/mainwindow/mainwindow.cpp index e4214571..3d091c6d 100644 --- a/src/gui/mainwindow/mainwindow.cpp +++ b/src/gui/mainwindow/mainwindow.cpp @@ -94,11 +94,11 @@ MainWindow::MainWindow(QSettings *settings, QWidget *parent) ui->actionEditorShowLineNumbers, &QAction::triggered, editor_tabs.data(), &EditorDock::set_show_line_numbers); connect( - ui->actionEditorEnableHighlight, &QAction::triggered, editor_tabs.data(), - &EditorDock::set_enable_hightlight); + ui->actionEditorHighlightPC, &QAction::triggered, editor_tabs.data(), + &EditorDock::set_highlight_pc); connect( - ui->actionEditorEnableFocusChange, &QAction::triggered, editor_tabs.data(), - &EditorDock::set_enable_focus_change); + ui->actionEditorFollowPC, &QAction::triggered, editor_tabs.data(), + &EditorDock::set_follow_pc); bool line_numbers_visible = settings->value("EditorShowLineNumbers", true).toBool(); editor_tabs->set_show_line_numbers(line_numbers_visible); diff --git a/src/gui/windows/editor/editordock.cpp b/src/gui/windows/editor/editordock.cpp index a8dd0260..5af4a8f0 100644 --- a/src/gui/windows/editor/editordock.cpp +++ b/src/gui/windows/editor/editordock.cpp @@ -161,7 +161,7 @@ void EditorDock::set_show_line_numbers(bool visible) { } } -void EditorDock::set_enable_hightlight(bool enable) { +void EditorDock::set_highlight_pc(bool enable) { enable_hightlight = enable; settings->setValue("editorEnableHighlisht", enable); for (int i = 0; i < this->count(); i++) { @@ -169,7 +169,7 @@ void EditorDock::set_enable_hightlight(bool enable) { } } -void EditorDock::set_enable_focus_change(bool enable) { +void EditorDock::set_follow_pc(bool enable) { enable_focus_change = enable; settings->setValue("editorEnableFocusChange", enable); for (int i = 0; i < this->count(); i++) { diff --git a/src/gui/windows/editor/editordock.h b/src/gui/windows/editor/editordock.h index 55efd372..6f806702 100644 --- a/src/gui/windows/editor/editordock.h +++ b/src/gui/windows/editor/editordock.h @@ -40,8 +40,8 @@ class EditorDock : public HidingTabWidget { public slots: void set_show_line_numbers(bool visible); - void set_enable_hightlight(bool enable); - void set_enable_focus_change(bool enable); + void set_highlight_pc(bool enable); + void set_follow_pc(bool enable); void open_file_dialog(); void save_tab(int index);