From 981df0c7e09302446c18f1a73972eea05125e693 Mon Sep 17 00:00:00 2001 From: defnax Date: Fri, 28 Nov 2014 16:33:56 +0000 Subject: [PATCH] * 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 --- .../src/gui/FileTransfer/DetailsDialog.cpp | 4 +- .../src/gui/FileTransfer/DetailsDialog.h | 2 +- retroshare-gui/src/gui/chat/ChatWidget.cpp | 24 +- retroshare-gui/src/gui/chat/ChatWidget.ui | 642 ++++++++---------- 4 files changed, 288 insertions(+), 384 deletions(-) diff --git a/retroshare-gui/src/gui/FileTransfer/DetailsDialog.cpp b/retroshare-gui/src/gui/FileTransfer/DetailsDialog.cpp index ef0417800..748e8ef0a 100644 --- a/retroshare-gui/src/gui/FileTransfer/DetailsDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/DetailsDialog.cpp @@ -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); diff --git a/retroshare-gui/src/gui/FileTransfer/DetailsDialog.h b/retroshare-gui/src/gui/FileTransfer/DetailsDialog.h index 63678a29e..8d1999102 100644 --- a/retroshare-gui/src/gui/FileTransfer/DetailsDialog.h +++ b/retroshare-gui/src/gui/FileTransfer/DetailsDialog.h @@ -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() {} diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index 6a909051c..a85e7da42 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -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); diff --git a/retroshare-gui/src/gui/chat/ChatWidget.ui b/retroshare-gui/src/gui/chat/ChatWidget.ui index e47d67f3e..4a5999a57 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.ui +++ b/retroshare-gui/src/gui/chat/ChatWidget.ui @@ -15,229 +15,229 @@ 2 - 0 - - - - - - - 3 - - - 2 - - - 0 - - - 3 - - - 3 - + 0 + + + - - - - 11 - 75 - true - + + + 3 - - Title + + 2 - + + 0 + + + 3 + + + 3 + + + + + + 11 + 75 + true + + + + Title + + + + + + + + 9 + + + + Status + + + + - - - - 9 - + + + Qt::Horizontal - - Status + + + 190 + 25 + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 2 + + + + + + 0 + 0 + + + + + 28 + 28 + + + + + 28 + 28 + + + + Qt::NoFocus + + + + :/images/highlight.png:/images/highlight.png + + + + 24 + 24 + + + + true + + + true + + + + + + + + + + + 14 + 28 + + + + + 14 + 28 + + + + Qt::NoFocus + + + + :/images/arrow-left.png:/images/arrow-left.png + + + true + + + + + + + + 14 + 28 + + + + + 14 + 28 + + + + Qt::NoFocus + + + + :/images/arrow-right.png:/images/arrow-right.png + + + true + + + + + + + + 0 + 0 + + + + + 28 + 28 + + + + + 28 + 28 + + + + Qt::NoFocus + + + Qt::CustomContextMenu + + + + :/images/find.png:/images/find.png + + + + 24 + 24 + + + + true + + + true + + + + - - - - - - Qt::Horizontal - - - - 190 - 25 - - - - - - - - QFrame::Box - - - QFrame::Sunken - - - - 2 - - - - - - 0 - 0 - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - - :/images/highlight.png:/images/highlight.png - - - - 24 - 24 - - - - true - - - true - - - - - - - - - - - 14 - 28 - - - - - 14 - 28 - - - - Qt::NoFocus - - - - :/images/arrow-left.png:/images/arrow-left.png - - - true - - - - - - - - 14 - 28 - - - - - 14 - 28 - - - - Qt::NoFocus - - - - :/images/arrow-right.png:/images/arrow-right.png - - - true - - - - - - - - 0 - 0 - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - Qt::CustomContextMenu - - - - :/images/find.png:/images/find.png - - - - 24 - 24 - - - - true - - - true - - - - - - - - - - - - + + + + + + @@ -515,102 +515,6 @@ border-image: url(:/images/closepressed.png) - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - Bold - - - - :/images/edit-bold.png:/images/edit-bold.png - - - true - - - true - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - Underline - - - - :/images/edit-underline.png:/images/edit-underline.png - - - true - - - true - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - Italic - - - - :/images/edit-italic.png:/images/edit-italic.png - - - true - - - true - - - @@ -719,7 +623,7 @@ border-image: url(:/images/closepressed.png) - :/images/add-share24.png:/images/add-share24.png + :/images/attach.png:/images/attach.png @@ -885,53 +789,53 @@ border-image: url(:/images/closepressed.png) - Reset font to default - - - - - true - - - Find Case Sensitively - - - - - true - - - Find Whole Words - - - Find Whole Words - - - - - true - - - Move To Cursor - - - Move To Cursor - - - - - true - - - Don't stop to color after X items found (need more CPU) - - - WARNING: Could take long time on big history. - - - - - + Reset font to default + + + + + true + + + Find Case Sensitively + + + + + true + + + Find Whole Words + + + Find Whole Words + + + + + true + + + Move To Cursor + + + Move To Cursor + + + + + true + + + Don't stop to color after X items found (need more CPU) + + + WARNING: Could take long time on big history. + + + + + RSTextBrowser QTextBrowser
gui/common/RSTextBrowser.h
@@ -944,17 +848,17 @@ border-image: url(:/images/closepressed.png)
MimeTextEdit - QTextEdit -
gui/common/MimeTextEdit.h
-
- - LineEditClear - QLineEdit -
gui/common/LineEditClear.h
-
-
- - + QTextEdit +
gui/common/MimeTextEdit.h
+
+ + LineEditClear + QLineEdit +
gui/common/LineEditClear.h
+
+
+ +