diff options
author | Ken Moore <ken@ixsystems.com> | 2017-11-30 10:03:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 10:03:29 -0500 |
commit | f8e1ea29e9fb2da62609b3be247125ffd1e9f1da (patch) | |
tree | 15e4b6bd0abb5be9d8df8ace158f1200cb4b6359 | |
parent | Make the poppler include path "poppler/qt5/<file.h>" rather than just the file. (diff) | |
parent | Add 'Show Toolbar' to textedit menu. (diff) | |
download | lumina-f8e1ea29e9fb2da62609b3be247125ffd1e9f1da.tar.gz lumina-f8e1ea29e9fb2da62609b3be247125ffd1e9f1da.tar.bz2 lumina-f8e1ea29e9fb2da62609b3be247125ffd1e9f1da.zip |
Merge pull request #518 from ktullavik/lumina-textedit-ui
Add 'Show Toolbar' to textedit menu.
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/MainUI.cpp | 10 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/MainUI.h | 1 | ||||
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/MainUI.ui | 14 |
3 files changed, 24 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp index 9e4ce499..33f2d851 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp @@ -72,6 +72,10 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ for(int i=0; i<smodes.length(); i++){ ui->menuSyntax_Highlighting->addAction(smodes[i]); } + + bool toolbarVisible = settings->value("showToolbar",true).toBool(); + ui->toolBar->setHidden(!toolbarVisible); + ui->actionShow_Toolbar->setChecked(toolbarVisible); ui->actionLine_Numbers->setChecked( settings->value("showLineNumbers",true).toBool() ); ui->actionWrap_Lines->setChecked( settings->value("wrapLines",true).toBool() ); ui->actionShow_Popups->setChecked( settings->value("showPopupWarnings",true).toBool() ); @@ -96,6 +100,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ connect(tabWidget->dndTabBar(), SIGNAL(DetachTab(int)), this, SLOT(tabDetached(int)) ); connect(tabWidget->dndTabBar(), SIGNAL(DroppedIn(QStringList)), this, SLOT(LoadArguments(QStringList)) ); connect(tabWidget->dndTabBar(), SIGNAL(DraggedOut(int, Qt::DropAction)), this, SLOT(tabDraggedOut(int, Qt::DropAction)) ); + connect(ui->actionShow_Toolbar, SIGNAL(toggled(bool)), this, SLOT(showToolbar(bool)) ); connect(ui->actionLine_Numbers, SIGNAL(toggled(bool)), this, SLOT(showLineNumbers(bool)) ); connect(ui->actionWrap_Lines, SIGNAL(toggled(bool)), this, SLOT(wrapLines(bool)) ); connect(ui->actionShow_Popups, SIGNAL(toggled(bool)), this, SLOT(showPopupWarnings(bool)) ); @@ -337,6 +342,11 @@ void MainUI::showPopupWarnings(bool show){ settings->setValue("showPopupWarnings",show); } +void MainUI::showToolbar(bool show){ + settings->setValue("showToolbar",show); + ui->toolBar->setHidden(!show); +} + void MainUI::updateTab(QString file){ PlainTextEditor *cur = 0; int index = -1; diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.h b/src-qt5/desktop-utils/lumina-textedit/MainUI.h index 6e5d2d23..148974a0 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.h +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.h @@ -60,6 +60,7 @@ private slots: //Other Menu Actions void UpdateHighlighting(QAction *act = 0); + void showToolbar(bool); void showLineNumbers(bool); void wrapLines(bool); void ModifyColors(); diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.ui b/src-qt5/desktop-utils/lumina-textedit/MainUI.ui index 026521b3..f88f3976 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.ui +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.ui @@ -182,7 +182,7 @@ <x>0</x> <y>0</y> <width>505</width> - <height>28</height> + <height>24</height> </rect> </property> <property name="contextMenuPolicy"> @@ -224,6 +224,7 @@ </widget> <addaction name="menuSyntax_Highlighting"/> <addaction name="menuTabs_Location"/> + <addaction name="actionShow_Toolbar"/> <addaction name="actionLine_Numbers"/> <addaction name="actionWrap_Lines"/> <addaction name="actionShow_Popups"/> @@ -436,6 +437,17 @@ <string>Ctrl+P</string> </property> </action> + <action name="actionShow_Toolbar"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="text"> + <string>Show Toolbar</string> + </property> + </action> </widget> <tabstops> <tabstop>line_find</tabstop> |