mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-21 13:49:04 -04:00
Added reset function
This commit is contained in:
parent
02f2f4e075
commit
51922db70a
3 changed files with 38 additions and 1 deletions
|
@ -714,6 +714,16 @@ void ChatPage::on_linkColorButton_clicked()
|
|||
}
|
||||
}
|
||||
|
||||
void ChatPage::on_resetButton_clicked()
|
||||
{
|
||||
QRgb color = QString::number(QColor(3, 155, 198).rgba()).toUInt();
|
||||
defaultColor = color;
|
||||
QPixmap pix(24, 24);
|
||||
pix.fill(color);
|
||||
ui.linkColorButton->setIcon(pix);
|
||||
Settings->setLinkColor(defaultColor);
|
||||
}
|
||||
|
||||
void ChatPage::distantChatComboBoxChanged(int i)
|
||||
{
|
||||
switch(i)
|
||||
|
|
|
@ -57,6 +57,7 @@ class ChatPage : public ConfigPage
|
|||
void on_cbSearch_WithoutLimit_toggled(bool);
|
||||
void on_btSearch_FoundColor_clicked();
|
||||
void on_linkColorButton_clicked();
|
||||
void on_resetButton_clicked();
|
||||
|
||||
void distantChatComboBoxChanged(int);
|
||||
|
||||
|
@ -88,6 +89,7 @@ class ChatPage : public ConfigPage
|
|||
|
||||
QRgb rgbChatSearchFoundColor;
|
||||
QRgb rgbLinkColor;
|
||||
QRgb defaultColor;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::ChatPage ui;
|
||||
|
|
|
@ -511,6 +511,18 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="linkColorButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Set link color</string>
|
||||
</property>
|
||||
|
@ -519,6 +531,17 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="resetButton">
|
||||
<property name="toolTip">
|
||||
<string>Reset to default color</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/textedit/undo.png</normaloff>:/icons/textedit/undo.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1418,6 +1441,8 @@
|
|||
<header>gui/common/RSComboBox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue