* Enabled Minimize/Maximize Button for File Transfer details dialog.

* Clean up Buttons on ChatWidget, for Fonts use now Font Button.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7717 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2014-11-28 16:33:56 +00:00
parent 1fff74656e
commit 981df0c7e0
4 changed files with 288 additions and 384 deletions

View file

@ -31,8 +31,8 @@
#include "gui/RetroShareLink.h" #include "gui/RetroShareLink.h"
/** Default constructor */ /** Default constructor */
DetailsDialog::DetailsDialog(QWidget *parent, Qt::WindowFlags flags) DetailsDialog::DetailsDialog(QWidget *parent)
: QDialog(parent, flags) : QDialog(parent, Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
{ {
/* Invoke Qt Designer generated QObject setup routine */ /* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this); ui.setupUi(this);

View file

@ -34,7 +34,7 @@ class DetailsDialog : public QDialog
public: public:
/** Default constructor */ /** Default constructor */
DetailsDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0); DetailsDialog(QWidget *parent = 0);
/** Default destructor */ /** Default destructor */
~DetailsDialog() {} ~DetailsDialog() {}

View file

@ -108,9 +108,9 @@ ChatWidget::ChatWidget(QWidget *parent) :
connect(ui->sendButton, SIGNAL(clicked()), this, SLOT(sendChat())); connect(ui->sendButton, SIGNAL(clicked()), this, SLOT(sendChat()));
connect(ui->addFileButton, SIGNAL(clicked()), this , SLOT(addExtraFile())); connect(ui->addFileButton, SIGNAL(clicked()), this , SLOT(addExtraFile()));
connect(ui->textboldButton, SIGNAL(clicked()), this, SLOT(setFont())); //connect(ui->textboldButton, SIGNAL(clicked()), this, SLOT(setFont()));
connect(ui->textunderlineButton, SIGNAL(clicked()), this, SLOT(setFont())); //connect(ui->textunderlineButton, SIGNAL(clicked()), this, SLOT(setFont()));
connect(ui->textitalicButton, SIGNAL(clicked()), this, SLOT(setFont())); //connect(ui->textitalicButton, SIGNAL(clicked()), this, SLOT(setFont()));
connect(ui->attachPictureButton, SIGNAL(clicked()), this, SLOT(addExtraPicture())); connect(ui->attachPictureButton, SIGNAL(clicked()), this, SLOT(addExtraPicture()));
connect(ui->colorButton, SIGNAL(clicked()), this, SLOT(chooseColor())); connect(ui->colorButton, SIGNAL(clicked()), this, SLOT(chooseColor()));
connect(ui->emoteiconButton, SIGNAL(clicked()), this, SLOT(smileyWidget())); connect(ui->emoteiconButton, SIGNAL(clicked()), this, SLOT(smileyWidget()));
@ -246,7 +246,7 @@ void ChatWidget::init(const RsPeerId &peerId, const QString &title)
currentFont.fromString(PeerSettings->getPrivateChatFont(peerId)); currentFont.fromString(PeerSettings->getPrivateChatFont(peerId));
colorChanged(); colorChanged();
fontChanged(); //fontChanged();
setColorAndFont(); setColorAndFont();
// load style // load style
@ -1121,7 +1121,7 @@ void ChatWidget::chooseFont()
QFont font = QFontDialog::getFont(&ok, currentFont, this); QFont font = QFontDialog::getFont(&ok, currentFont, this);
if (ok) { if (ok) {
currentFont = font; currentFont = font;
fontChanged(); //fontChanged();
setFont(); setFont();
} }
} }
@ -1129,22 +1129,22 @@ void ChatWidget::chooseFont()
void ChatWidget::resetFont() void ChatWidget::resetFont()
{ {
currentFont.fromString(Settings->getChatScreenFont()); currentFont.fromString(Settings->getChatScreenFont());
fontChanged(); //fontChanged();
setFont(); setFont();
} }
void ChatWidget::fontChanged() void ChatWidget::fontChanged()
{ {
ui->textboldButton->setChecked(currentFont.bold()); //ui->textboldButton->setChecked(currentFont.bold());
ui->textunderlineButton->setChecked(currentFont.underline()); //ui->textunderlineButton->setChecked(currentFont.underline());
ui->textitalicButton->setChecked(currentFont.italic()); //ui->textitalicButton->setChecked(currentFont.italic());
} }
void ChatWidget::setColorAndFont() void ChatWidget::setColorAndFont()
{ {
currentFont.setBold(ui->textboldButton->isChecked()); //currentFont.setBold(ui->textboldButton->isChecked());
currentFont.setUnderline(ui->textunderlineButton->isChecked()); //currentFont.setUnderline(ui->textunderlineButton->isChecked());
currentFont.setItalic(ui->textitalicButton->isChecked()); //currentFont.setItalic(ui->textitalicButton->isChecked());
ui->chatTextEdit->setFont(currentFont); ui->chatTextEdit->setFont(currentFont);
ui->chatTextEdit->setTextColor(currentColor); ui->chatTextEdit->setTextColor(currentColor);

View file

@ -15,229 +15,229 @@
<number>2</number> <number>2</number>
</property> </property>
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="hTitleLayout"> <layout class="QHBoxLayout" name="hTitleLayout">
<item>
<layout class="QVBoxLayout" name="titleLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item> <item>
<widget class="QLabel" name="titleLabel"> <layout class="QVBoxLayout" name="titleLayout">
<property name="font"> <property name="spacing">
<font> <number>3</number>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="leftMargin">
<string notr="true">Title</string> <number>2</number>
</property> </property>
</widget> <property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<widget class="QLabel" name="titleLabel">
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Title</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="statusMessageLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string notr="true">Status</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QLabel" name="statusMessageLabel"> <spacer>
<property name="font"> <property name="orientation">
<font> <enum>Qt::Horizontal</enum>
<pointsize>9</pointsize>
</font>
</property> </property>
<property name="text"> <property name="sizeHint" stdset="0">
<string notr="true">Status</string> <size>
<width>190</width>
<height>25</height>
</size>
</property> </property>
</spacer>
</item>
<item>
<widget class="QFrame" name="titleBarFrame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="hlTitleBarFrame">
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="QToolButton" name="markButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/highlight.png</normaloff>:/images/highlight.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LineEditClear" name="leSearch"/>
</item>
<item>
<widget class="QToolButton" name="searchBefore">
<property name="minimumSize">
<size>
<width>14</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/arrow-left.png</normaloff>:/images/arrow-left.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchAfter">
<property name="minimumSize">
<size>
<width>14</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/arrow-right.png</normaloff>:/images/arrow-right.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/find.png</normaloff>:/images/find.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item> <item>
<spacer> <widget class="QFrame" name="infoFrame">
<property name="orientation"> <property name="palette">
<enum>Qt::Horizontal</enum> <palette>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>190</width>
<height>25</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QFrame" name="titleBarFrame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="hlTitleBarFrame">
<property name="margin">
<number>2</number>
</property>
<item>
<widget class="QToolButton" name="markButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/highlight.png</normaloff>:/images/highlight.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="LineEditClear" name="leSearch"/>
</item>
<item>
<widget class="QToolButton" name="searchBefore">
<property name="minimumSize">
<size>
<width>14</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/arrow-left.png</normaloff>:/images/arrow-left.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchAfter">
<property name="minimumSize">
<size>
<width>14</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>14</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/arrow-right.png</normaloff>:/images/arrow-right.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="searchButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/find.png</normaloff>:/images/find.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QFrame" name="infoFrame">
<property name="palette">
<palette>
<active> <active>
<colorrole role="Base"> <colorrole role="Base">
<brush brushstyle="SolidPattern"> <brush brushstyle="SolidPattern">
@ -515,102 +515,6 @@ border-image: url(:/images/closepressed.png)
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QToolButton" name="textboldButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Bold</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/edit-bold.png</normaloff>:/images/edit-bold.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="textunderlineButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Underline</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/edit-underline.png</normaloff>:/images/edit-underline.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="textitalicButton">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Italic</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/edit-italic.png</normaloff>:/images/edit-italic.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<widget class="QToolButton" name="fontButton"> <widget class="QToolButton" name="fontButton">
<property name="minimumSize"> <property name="minimumSize">
@ -719,7 +623,7 @@ border-image: url(:/images/closepressed.png)
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset resource="../images.qrc">
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset> <normaloff>:/images/attach.png</normaloff>:/images/attach.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
<size> <size>
@ -885,53 +789,53 @@ border-image: url(:/images/closepressed.png)
</action> </action>
<action name="actionResetFont"> <action name="actionResetFont">
<property name="text"> <property name="text">
<string>Reset font to default</string> <string>Reset font to default</string>
</property> </property>
</action> </action>
<action name="actionFindCaseSensitively"> <action name="actionFindCaseSensitively">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Find Case Sensitively</string> <string>Find Case Sensitively</string>
</property> </property>
</action> </action>
<action name="actionFindWholeWords"> <action name="actionFindWholeWords">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Find Whole Words</string> <string>Find Whole Words</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Find Whole Words</string> <string>Find Whole Words</string>
</property> </property>
</action> </action>
<action name="actionMoveToCursor"> <action name="actionMoveToCursor">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Move To Cursor</string> <string>Move To Cursor</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Move To Cursor</string> <string>Move To Cursor</string>
</property> </property>
</action> </action>
<action name="actionSearchWithoutLimit"> <action name="actionSearchWithoutLimit">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Don't stop to color after X items found (need more CPU)</string> <string>Don't stop to color after X items found (need more CPU)</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>WARNING: Could take long time on big history.</string> <string>WARNING: Could take long time on big history.</string>
</property> </property>
</action> </action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>RSTextBrowser</class> <class>RSTextBrowser</class>
<extends>QTextBrowser</extends> <extends>QTextBrowser</extends>
<header>gui/common/RSTextBrowser.h</header> <header>gui/common/RSTextBrowser.h</header>
@ -944,17 +848,17 @@ border-image: url(:/images/closepressed.png)
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>MimeTextEdit</class> <class>MimeTextEdit</class>
<extends>QTextEdit</extends> <extends>QTextEdit</extends>
<header location="global">gui/common/MimeTextEdit.h</header> <header location="global">gui/common/MimeTextEdit.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>LineEditClear</class> <class>LineEditClear</class>
<extends>QLineEdit</extends> <extends>QLineEdit</extends>
<header location="global">gui/common/LineEditClear.h</header> <header location="global">gui/common/LineEditClear.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>