mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 10:19:24 -04:00
* 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:
parent
1fff74656e
commit
981df0c7e0
4 changed files with 288 additions and 384 deletions
|
@ -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);
|
||||||
|
|
|
@ -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() {}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue