diff --git a/src/MainWindow.h b/src/MainWindow.h
--- a/src/MainWindow.h
+++ b/src/MainWindow.h
@@ -100,6 +100,14 @@
*/
void setMenuBarInitialVisibility(bool visible);
+
+ /**
+ * @brief Set the framless state
+ *
+ * @param frameless
+ */
+ void setRemoveWindowTitleBarAndFrame(bool frameless);
+
Q_SIGNALS:
/**
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -758,7 +758,7 @@
void MainWindow::applyKonsoleSettings()
{
setMenuBarInitialVisibility(KonsoleSettings::showMenuBarByDefault());
-
+ setRemoveWindowTitleBarAndFrame(KonsoleSettings::removeWindowTitleBarAndFrame());
if (KonsoleSettings::allowMenuAccelerators()) {
restoreMenuAccelerators();
} else {
@@ -812,6 +812,23 @@
_menuBarInitialVisibility = visible;
}
+void MainWindow::setRemoveWindowTitleBarAndFrame(bool frameless)
+{
+ // This is used to check if the window is in "opening" state
+ // And avoid the visibility change when we change the window flag
+ bool oldVisibility = isVisible();
+
+ if(frameless) {
+ setWindowFlags(Qt::FramelessWindowHint);
+ } else {
+ setWindowFlags(Qt::Widget);
+ }
+
+ if (oldVisibility & !isVisible()) {
+ setVisible(true);
+ }
+}
+
void MainWindow::showEvent(QShowEvent *event)
{
// Make sure the 'initial' visibility is applied only once.
diff --git a/src/settings/GeneralSettings.ui b/src/settings/GeneralSettings.ui
--- a/src/settings/GeneralSettings.ui
+++ b/src/settings/GeneralSettings.ui
@@ -28,20 +28,20 @@
Konsole Window
-
-
+
+ 00
- Show menubar by default
+ Show window title on the titlebar
-
+
@@ -54,39 +54,39 @@
-
-
+
+ 00
- If enabled, profile settings will be ignored
+ When launching Konsole re-use existing process if possible
- Use current window size on next startup
+ Run all Konsole windows in a single process
-
+ 00
- When launching Konsole re-use existing process if possible
+ If enabled, profile settings will be ignored
- Run all Konsole windows in a single process
+ Use current window size on next startup
-
+
@@ -99,16 +99,23 @@
-
-
+
+ 00
- Show window title on the titlebar
+ Show menubar by default
+
+
+
+
+
+
+ Remove window titlebar and frame
@@ -136,12 +143,12 @@
0
+
+ Sets whether the search is case sensitive
+ Search is case sensitive
-
- Sets whether the search is case sensitive
-
@@ -178,12 +185,12 @@
0
-
- Search backwards
- Sets whether search should start from the bottom
+
+ Search backwards
+
diff --git a/src/settings/konsole.kcfg b/src/settings/konsole.kcfg
--- a/src/settings/konsole.kcfg
+++ b/src/settings/konsole.kcfg
@@ -10,6 +10,11 @@
Show menubar by default in each Konsole windowtrue
+
+
+ Remove frame around konsole
+ false
+ Show window title set by escape sequence on the titlebar