* 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

@ -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>