* 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"
/** Default constructor */
DetailsDialog::DetailsDialog(QWidget *parent, Qt::WindowFlags flags)
: QDialog(parent, flags)
DetailsDialog::DetailsDialog(QWidget *parent)
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
{
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);

View File

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

View File

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

View File

@ -15,229 +15,229 @@
<number>2</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<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>
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="hTitleLayout">
<item>
<widget class="QLabel" name="titleLabel">
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
<layout class="QVBoxLayout" name="titleLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="text">
<string notr="true">Title</string>
<property name="leftMargin">
<number>2</number>
</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>
<widget class="QLabel" name="statusMessageLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="text">
<string notr="true">Status</string>
<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>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</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>
</layout>
</item>
<item>
<widget class="QFrame" name="infoFrame">
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
@ -515,102 +515,6 @@ border-image: url(:/images/closepressed.png)
</property>
</widget>
</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>
<widget class="QToolButton" name="fontButton">
<property name="minimumSize">
@ -719,7 +623,7 @@ border-image: url(:/images/closepressed.png)
</property>
<property name="icon">
<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 name="iconSize">
<size>
@ -885,53 +789,53 @@ border-image: url(:/images/closepressed.png)
</action>
<action name="actionResetFont">
<property name="text">
<string>Reset font to default</string>
</property>
</action>
<action name="actionFindCaseSensitively">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Find Case Sensitively</string>
</property>
</action>
<action name="actionFindWholeWords">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Find Whole Words</string>
</property>
<property name="toolTip">
<string>Find Whole Words</string>
</property>
</action>
<action name="actionMoveToCursor">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Move To Cursor</string>
</property>
<property name="toolTip">
<string>Move To Cursor</string>
</property>
</action>
<action name="actionSearchWithoutLimit">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Don't stop to color after X items found (need more CPU)</string>
</property>
<property name="toolTip">
<string>WARNING: Could take long time on big history.</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<string>Reset font to default</string>
</property>
</action>
<action name="actionFindCaseSensitively">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Find Case Sensitively</string>
</property>
</action>
<action name="actionFindWholeWords">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Find Whole Words</string>
</property>
<property name="toolTip">
<string>Find Whole Words</string>
</property>
</action>
<action name="actionMoveToCursor">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Move To Cursor</string>
</property>
<property name="toolTip">
<string>Move To Cursor</string>
</property>
</action>
<action name="actionSearchWithoutLimit">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Don't stop to color after X items found (need more CPU)</string>
</property>
<property name="toolTip">
<string>WARNING: Could take long time on big history.</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>RSTextBrowser</class>
<extends>QTextBrowser</extends>
<header>gui/common/RSTextBrowser.h</header>
@ -944,17 +848,17 @@ border-image: url(:/images/closepressed.png)
</customwidget>
<customwidget>
<class>MimeTextEdit</class>
<extends>QTextEdit</extends>
<header location="global">gui/common/MimeTextEdit.h</header>
</customwidget>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header location="global">gui/common/LineEditClear.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>
<extends>QTextEdit</extends>
<header location="global">gui/common/MimeTextEdit.h</header>
</customwidget>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header location="global">gui/common/LineEditClear.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>
</resources>
<connections/>
</ui>