fix some bugs in settings UI section

This commit is contained in:
Martin Rotter 2023-11-03 10:29:38 +01:00
parent 6f727b2650
commit 919547e586
2 changed files with 4 additions and 5 deletions

View file

@ -22,7 +22,6 @@ ColorToolButton::ColorToolButton(QWidget* parent) : QToolButton(parent), m_color
if (new_color.isValid()) {
setColor(new_color);
emit colorChanged(new_color);
}
});
}
@ -34,13 +33,14 @@ QColor ColorToolButton::color() const {
void ColorToolButton::setColor(const QColor& color) {
m_color = color;
repaint();
emit colorChanged(m_color);
}
void ColorToolButton::setRandomColor() {
auto clr = TextFactory::generateRandomColor();
setColor(clr);
emit colorChanged(clr);
}
void ColorToolButton::paintEvent(QPaintEvent* e) {
@ -76,6 +76,5 @@ void ColorToolButton::mouseReleaseEvent(QMouseEvent* event) {
if (event->button() == Qt::MouseButton::RightButton) {
setColor(m_alternateColor);
emit colorChanged(m_alternateColor);
}
}

View file

@ -20,7 +20,7 @@
<item>
<widget class="QTabWidget" name="m_tabUi">
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="m_tabIconSkin">
<attribute name="title">
@ -126,7 +126,7 @@
<item row="2" column="0">
<widget class="QGroupBox" name="m_gbCustomSkinColors">
<property name="title">
<string>Force custom skin colors</string>
<string>Customize predefined colors</string>
</property>
<property name="checkable">
<bool>true</bool>