Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 31d48303 authored by Mariusz Glebocki's avatar Mariusz Glebocki Committed by Kurt Hindenburg

Edit Profile Dialog UI redesign

Summary:
Overall changes
---------------

* Use a dialog with category buttons on the left, which is used in most
  KDE applications
* Apply KDE HIG as much as possible
* Align layout columns in multiple group boxes
* Move some settings to another groups

General page
------------

{F6447280}

Profile name and icon, and settings related to session/application
initialization.

* Move "Show hint for terminal size after resizing" to Appearance page
* Move "Dim the colors when the window loses focus" to Appearance page

Tabs page, rename tab dialog
----------------------------

{F6447281}

Tabs settings

* Only minor UI changes

Appearance page
---------------

{F6447282} {F6447283} {F6447284}
{F6447290}

Settings related to basic appearance.

* Add additional tabs
  * Cursor - cursor settings from Advanced page
  * Miscellaneous
    * Add "Line spacing" from Advanced page
    * Add previously missing terminal margins and terminal center
      settings (4 years old config-only feature)
    * Add "Show hint for terminal size after resizing" from General page
    * Add "Dim the colors when the window loses focus" from General page
* Use customized font selection dialog
  * Show all printable ASCII characters and look-alike character sets as
    a preview
  * Live preview for changes in the dialog
* Move "Show all fonts" to the font selection dialog
* Remove "text size" (it is replaced with live preview in the font
  dialog)
* Add live preview for cursor settings
* Add live preview for "Line spacing"

Scrolling page, history size dialog
-----------------------------------

{F6447285}

Settings related to scrolling and history.

* Replace popping-in warning frames in "Scrollback" group with warning
  buttons which show floating warning after click. The controls does
  not change position anymore when switching the scrollback options.
  Applies also to history size dialog.
* Replace scrollbar "hide"/"show on left side"/"show on right side"
  options with "visible" checkbox and "show on left side"/"show on
  right side" options enabled after checking the checkbox.

Keyboard page
-------------

{F6447286}

* Removed redundant group box

Mouse page
----------

{F6447287}
{F6447288}

* Shorten "Characters considered part of a word..." label
* Replace "triple-click selects" drop-down with option buttons
* Split settings to "Text interaction" and "Miscellaneous" tabs
* Use monospace font for "Word characters" text input

Advanced page
-------------

{F6447289}

More advanced settings or settings regular user don't care about.

* Replace "Show URL hints when these keys are pressed" checkboxes with
  toggle buttons which are easier to associate visually with hardware
  keys
* Move "Line spacing" to Appearance tab
* Move cursor settings to Appearance tab
* Show "Default character encoding" value directly on drop-down button

Preview for: breeze (dark colors), Oxygen, QtCurve
--------------------------------------------------

{F6447339}

Test Plan:
* Check visually with light/dark color scheme, Breeze, Fusion, Oxygen,
  QtCurve widget styles, normal/large font, QT_SCALE_FACTOR set
  to 1 and 2
* Change every possible control to check UI logic
* Change as much settings as possible and see if they are applied

Reviewers: #konsole, #vdg, ngraham, hindenburg

Reviewed By: #konsole, #vdg, ngraham, hindenburg

Subscribers: emateli, loh.tar, hein, mart, hindenburg, rizzitello, abetts, ngraham, konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D17244
parent 24a6863e
......@@ -63,6 +63,7 @@ set(konsoleprivate_SRCS ${sessionadaptors_SRCS}
ColorSchemeEditor.cpp
CopyInputDialog.cpp
EditProfileDialog.cpp
FontDialog.cpp
Emulation.cpp
DetachableTabBar.cpp
Filter.cpp
......@@ -141,7 +142,13 @@ endif()
ki18n_wrap_ui(konsoleprivate_SRCS ColorSchemeEditor.ui
CopyInputDialog.ui
EditProfileDialog.ui
EditProfileGeneralPage.ui
EditProfileTabsPage.ui
EditProfileAppearancePage.ui
EditProfileScrollingPage.ui
EditProfileKeyboardPage.ui
EditProfileMousePage.ui
EditProfileAdvancedPage.ui
KeyBindingEditor.ui
RenameTabDialog.ui
RenameTabWidget.ui
......
......@@ -124,6 +124,9 @@ public:
}
}
quint8 colorSpace() { return _colorSpace; }
void termColor(int *u, int *v, int *w) { *u = _u; *v = _v; *w = _w; }
/**
* Returns true if this character color entry is valid.
*/
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>EditProfileAdvancedPage</class>
<widget class="QWidget" name="EditProfileAdvancedPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>400</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout">
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="urlHintsLabel">
<property name="text">
<string>Key combination to show URL hints:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" stretch="0,1">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<item>
<widget class="QToolButton" name="urlHintsModifierShift">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="key on keyboard">Shift</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonFollowStyle</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="urlHintsModifierCtrl">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="key on keyboard">Ctrl</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonFollowStyle</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="urlHintsModifierAlt">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="key on keyboard">Alt</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonFollowStyle</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="urlHintsModifierMeta">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string comment="key on keyboard">Meta</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonFollowStyle</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="1" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="label">
<property name="text">
<string>Miscellaneous:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="enableReverseUrlHints">
<property name="toolTip">
<string>Number URL hints in reverse, starting from the bottom</string>
</property>
<property name="text">
<string>Reverse URL hint numbering</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="enableBlinkingTextButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Allow terminal programs to create blinking sections of text</string>
</property>
<property name="text">
<string>Allow blinking text</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="enableFlowControlButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Allow the output to be suspended by pressing Ctrl+S</string>
</property>
<property name="text">
<string>Flow control</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="enableBidiRenderingButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Enable Bi-Directional display on terminals (valid for Arabic, Farsi or Hebrew only)</string>
</property>
<property name="text">
<string>Bi-Directional text rendering</string>
</property>
</widget>
</item>
<item row="6" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Default character encoding:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>selectEncodingButton</cstring>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QPushButton" name="selectEncodingButton">
<property name="text">
<string comment="KDE::DoNotExtract">DEFAULTENCODING</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>111</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<tabstops>
<tabstop>urlHintsModifierShift</tabstop>
<tabstop>urlHintsModifierCtrl</tabstop>
<tabstop>urlHintsModifierAlt</tabstop>
<tabstop>urlHintsModifierMeta</tabstop>
</tabstops>
<resources />
<connections />
</ui>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
Copyright 2018 by Mariusz Glebocki <mglb@arccos-1.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
*/
// Own
#include "FontDialog.h"
// Qt
#include <QBoxLayout>
#include <QWhatsThis>
// KDE
#include <KLocalizedString>
#include <KMessageBox>
using namespace Konsole;
FontDialog::FontDialog(QWidget *parent) :
QDialog(parent)
, _fontChooser(nullptr)
, _showAllFonts(nullptr)
, _buttonBox(nullptr)
{
setWindowTitle(i18nc("@title:window", "Select font"));
_fontChooser = new KFontChooser(this, KFontChooser::FixedFontsOnly);
_showAllFonts = new QCheckBox(i18n("Show all fonts"), this);
_showAllFontsWarningButton = new QToolButton(this);
_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok |
QDialogButtonBox::Cancel,
Qt::Horizontal, this);
_fontChooser->setSampleText(QStringLiteral(
"0OQ 1Il!| 5S 8B rnm :; ,. \"'` ~-= ({[<>]})\n"
"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\n"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\n"
"abcdefghijklmnopqrstuvwxyz"
));
_showAllFontsWarningButton->setIcon(QIcon::fromTheme(QStringLiteral("emblem-warning")));
_showAllFontsWarningButton->setAutoRaise(true);
connect(_fontChooser, &KFontChooser::fontSelected, this, &FontDialog::fontChanged);
connect(_showAllFonts, &QCheckBox::toggled, this, [this](bool enable) {
_fontChooser->setFont(_fontChooser->font(), !enable);
});
connect(_showAllFontsWarningButton, &QToolButton::clicked, this, [this](bool) {
const QString message = i18n("By its very nature, a terminal program requires font characters that are equal width (monospace). Any non monospaced font may cause display issues. This should not be necessary except in rare cases.");
const QPoint pos = QPoint(_showAllFonts->width() / 2, _showAllFonts->height());
QWhatsThis::showText(_showAllFonts->mapToGlobal(pos), message, _showAllFonts);
});
connect(_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
auto *showAllFontsLayout = new QHBoxLayout();
showAllFontsLayout->addWidget(_showAllFonts);
showAllFontsLayout->addWidget(_showAllFontsWarningButton);
showAllFontsLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
showAllFontsLayout->setContentsMargins(0, 0, 0, 0);
showAllFontsLayout->setSpacing(0);
auto *layout = new QVBoxLayout(this);
layout->addWidget(_fontChooser, 1);
layout->addLayout(showAllFontsLayout);
layout->addWidget(_buttonBox);
}
void FontDialog::setFont(const QFont &font)
{
_fontChooser->setFont(font, !_showAllFonts->isChecked());
}
This diff is collapsed.
......@@ -54,7 +54,7 @@ HistorySizeDialog::HistorySizeDialog(QWidget *parent) :
_ui->setupUi(mainWidget);
_ui->tempWarningWidget->setVisible(true);
_ui->tempWarningWidget->setWordWrap(true);
_ui->tempWarningWidget->setWordWrap(false);
_ui->tempWarningWidget->setCloseButtonVisible(false);
_ui->tempWarningWidget->setMessageType(KMessageWidget::Information);
_ui->tempWarningWidget->setText(i18nc("@info:status",
......@@ -85,3 +85,8 @@ void HistorySizeDialog::setLineCount(int lines)
{
_ui->historySizeWidget->setLineCount(lines);
}
QSize HistorySizeDialog::sizeHint() const {
return QSize(_ui->tempWarningWidget->sizeHint().width(), 0);
}
......@@ -52,6 +52,8 @@ public:
/** See HistorySizeWidget::lineCount. */
int lineCount() const;
QSize sizeHint() const override;
private:
Ui::HistorySizeDialog *_ui;
};
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment