fix some bugs in settings UI section
This commit is contained in:
parent
6f727b2650
commit
919547e586
2 changed files with 4 additions and 5 deletions
|
@ -22,7 +22,6 @@ ColorToolButton::ColorToolButton(QWidget* parent) : QToolButton(parent), m_color
|
||||||
|
|
||||||
if (new_color.isValid()) {
|
if (new_color.isValid()) {
|
||||||
setColor(new_color);
|
setColor(new_color);
|
||||||
emit colorChanged(new_color);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -34,13 +33,14 @@ QColor ColorToolButton::color() const {
|
||||||
void ColorToolButton::setColor(const QColor& color) {
|
void ColorToolButton::setColor(const QColor& color) {
|
||||||
m_color = color;
|
m_color = color;
|
||||||
repaint();
|
repaint();
|
||||||
|
|
||||||
|
emit colorChanged(m_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorToolButton::setRandomColor() {
|
void ColorToolButton::setRandomColor() {
|
||||||
auto clr = TextFactory::generateRandomColor();
|
auto clr = TextFactory::generateRandomColor();
|
||||||
|
|
||||||
setColor(clr);
|
setColor(clr);
|
||||||
emit colorChanged(clr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorToolButton::paintEvent(QPaintEvent* e) {
|
void ColorToolButton::paintEvent(QPaintEvent* e) {
|
||||||
|
@ -76,6 +76,5 @@ void ColorToolButton::mouseReleaseEvent(QMouseEvent* event) {
|
||||||
|
|
||||||
if (event->button() == Qt::MouseButton::RightButton) {
|
if (event->button() == Qt::MouseButton::RightButton) {
|
||||||
setColor(m_alternateColor);
|
setColor(m_alternateColor);
|
||||||
emit colorChanged(m_alternateColor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="m_tabUi">
|
<widget class="QTabWidget" name="m_tabUi">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="m_tabIconSkin">
|
<widget class="QWidget" name="m_tabIconSkin">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QGroupBox" name="m_gbCustomSkinColors">
|
<widget class="QGroupBox" name="m_gbCustomSkinColors">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Force custom skin colors</string>
|
<string>Customize predefined colors</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
Loading…
Add table
Reference in a new issue