mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-09-21 05:14:40 -04:00
Several ui fixes (#11967)
* Fix background color error for invalid autotype shortcut * Fix alignment in autotype settings * Fix contrast for splitter handle * Fix font size reset when changing theme --------- Co-authored-by: Jonathan White <support@dmapps.us>
This commit is contained in:
parent
7ea141652e
commit
6e1694111f
6 changed files with 14 additions and 10 deletions
|
@ -31,6 +31,7 @@
|
|||
#include "gui/Icons.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/osutils/OSUtils.h"
|
||||
#include "gui/styles/StateColorPalette.h"
|
||||
#include "quickunlock/QuickUnlockInterface.h"
|
||||
|
||||
#include "FileDialog.h"
|
||||
|
@ -136,7 +137,10 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent)
|
|||
m_generalUi->autoTypeShortcutWidget->setStyleSheet("");
|
||||
} else {
|
||||
QToolTip::showText(mapToGlobal(rect().bottomLeft()), error);
|
||||
m_generalUi->autoTypeShortcutWidget->setStyleSheet("background-color: #FF9696;");
|
||||
StateColorPalette statePalette;
|
||||
auto color = statePalette.color(StateColorPalette::ColorRole::Error);
|
||||
m_generalUi->autoTypeShortcutWidget->setStyleSheet(
|
||||
QString("QLineEdit { background: %1; }").arg(color.name()));
|
||||
}
|
||||
});
|
||||
connect(m_generalUi->autoTypeShortcutWidget, &ShortcutWidget::shortcutReset, this, [this] {
|
||||
|
|
|
@ -1357,6 +1357,9 @@
|
|||
<property name="text">
|
||||
<string>Remember last typed entry for:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
|
|
|
@ -2015,6 +2015,7 @@ void MainWindow::initViewMenu()
|
|||
restartApp(tr("You must restart the application to apply this setting. Would you like to restart now?"));
|
||||
} else {
|
||||
kpxcApp->applyTheme();
|
||||
kpxcApp->applyFontSize();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -537,7 +537,6 @@
|
|||
<tabstop>transformBenchmarkButton</tabstop>
|
||||
<tabstop>memorySpinBox</tabstop>
|
||||
<tabstop>parallelismSpinBox</tabstop>
|
||||
<tabstop>advancedSettingsButton</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
|
|
@ -319,6 +319,7 @@ namespace Phantom
|
|||
S_sliderHandle_pressed,
|
||||
S_sliderHandle_specular,
|
||||
S_sliderHandle_pressed_specular,
|
||||
S_splitterHandle,
|
||||
S_base_shadow,
|
||||
S_base_divider,
|
||||
S_windowText_disabled,
|
||||
|
@ -435,7 +436,8 @@ namespace Phantom
|
|||
isLight ? colors[S_button_pressed] : Dc::adjustLightness(colors[S_button_pressed], 0.03);
|
||||
colors[S_sliderHandle_pressed_specular] = isLight ? Dc::specularOf(colors[S_sliderHandle_pressed])
|
||||
: Dc::lightSpecularOf(colors[S_sliderHandle_pressed]);
|
||||
|
||||
colors[S_splitterHandle] =
|
||||
isLight ? Dc::adjustLightness(colors[S_window], -0.1) : Dc::adjustLightness(colors[S_window], 0.15);
|
||||
colors[S_base_shadow] = Dc::overhangShadowOf(colors[S_base]);
|
||||
colors[S_base_divider] = colors[S_window_divider];
|
||||
colors[S_windowText_disabled] = pal.color(QPalette::Disabled, QPalette::WindowText);
|
||||
|
@ -2206,7 +2208,7 @@ void BaseStyle::drawControl(ControlElement element,
|
|||
if (r.width() < 5 || r.height() < 5)
|
||||
break;
|
||||
int length = Ph::dpiScaled(Ph::SplitterMaxLength);
|
||||
int thickness = Ph::dpiScaled(1);
|
||||
int thickness = Ph::dpiScaled(2);
|
||||
QSize size;
|
||||
if (option->state & State_Horizontal) {
|
||||
if (r.height() < length)
|
||||
|
@ -2218,8 +2220,7 @@ void BaseStyle::drawControl(ControlElement element,
|
|||
size = QSize(length, thickness);
|
||||
}
|
||||
QRect filledRect = QStyle::alignedRect(option->direction, Qt::AlignCenter, size, r);
|
||||
painter->fillRect(filledRect, swatch.color(S_button_specular));
|
||||
Ph::fillRectOutline(painter, filledRect.adjusted(-1, 0, 1, 0), 1, swatch.color(S_window_divider));
|
||||
painter->fillRect(filledRect, swatch.color(S_splitterHandle));
|
||||
break;
|
||||
}
|
||||
// TODO update this for phantom
|
||||
|
|
|
@ -29,10 +29,6 @@ QPushButton:default:hover, QPushButton:checked:hover {
|
|||
background: #2E582E;
|
||||
}
|
||||
|
||||
QSplitterHandle {
|
||||
background-color: #56565A;
|
||||
}
|
||||
|
||||
QToolTip {
|
||||
color: #BFBFBF;
|
||||
background-color: #2D532D;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue