mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added Color feature to can set ToolBar/MenuBars gradient Colors.
reordner MessagesDialog columns git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@430 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d30e5b57f4
commit
87bfe1eed9
@ -67,6 +67,8 @@
|
||||
#define IMAGE_CLOSE ":/images/close_normal.png"
|
||||
#define IMAGE_SMPLAYER ":/images/smplayer_icon32.png"
|
||||
#define IMAGE_BLOCK ":/images/blockdevice.png"
|
||||
#define IMAGE_COLOR ":/images/highlight.png"
|
||||
|
||||
|
||||
/* Keys for UI Preferences */
|
||||
#define UI_PREF_PROMPT_ON_QUIT "UIOptions/ConfirmOnQuit"
|
||||
@ -189,12 +191,16 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef RS_RELEASE_VERSION
|
||||
addAction(new QAction(QIcon(IMAGE_BLOCK), tr("Unfinished"), ui.toolBar), SLOT(showApplWindow()));
|
||||
#else
|
||||
addAction(new QAction(QIcon(IMAGE_BLOCK), tr("Unfinished"), ui.toolBar), SLOT(showApplWindow()));
|
||||
#endif
|
||||
|
||||
addAction(new QAction(QIcon(IMAGE_COLOR), tr("Color"), ui.toolBar), SLOT(setStyle()));
|
||||
|
||||
|
||||
#ifdef NO_MORE_OPTIONS_OR_SS
|
||||
|
||||
/* Create and bind the Preferences button */
|
||||
@ -596,3 +602,16 @@ void MainWindow::showsmplayer()
|
||||
smplayer->gui()->show();
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::setStyle()
|
||||
{
|
||||
QString standardSheet = "{background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,stop:0 <color1>, stop:1 <color2>);}";
|
||||
QColor stop1 = QColorDialog::getColor(Qt::white);
|
||||
QColor stop2 = QColorDialog::getColor(Qt::black);
|
||||
//QString widgetSheet = ".QWidget" + standardSheet.replace("<color1>", stop1.name()).replace("<color2>", stop2.name());
|
||||
QString toolSheet = "QToolBar" + standardSheet.replace("<color1>", stop1.name()).replace("<color2>", stop2.name());
|
||||
QString menuSheet = "QMenuBar" + standardSheet.replace("<color1>", stop1.name()).replace("<color2>", stop2.name());
|
||||
qApp->setStyleSheet(/*widgetSheet + */toolSheet + menuSheet);
|
||||
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ private slots:
|
||||
void showsmplayer();
|
||||
|
||||
void showSettings();
|
||||
|
||||
void setStyle();
|
||||
|
||||
/** Called when console button is toggled */
|
||||
void showConsoleFrame(bool show);
|
||||
|
@ -77,14 +77,16 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
||||
|
||||
/* hide the Tree +/- */
|
||||
ui.msgList->setRootIsDecorated( false );
|
||||
|
||||
ui.msgWidget->setRootIsDecorated( false );
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView * msgwheader = ui.msgWidget->header () ;
|
||||
msgwheader->setResizeMode (0, QHeaderView::Interactive);
|
||||
msgwheader->setResizeMode (0, QHeaderView::Custom);
|
||||
msgwheader->setResizeMode (3, QHeaderView::Interactive);
|
||||
|
||||
msgwheader->resizeSection ( 0, 140 );
|
||||
msgwheader->resizeSection ( 2, 150 );
|
||||
msgwheader->resizeSection ( 0, 24 );
|
||||
msgwheader->resizeSection ( 2, 250 );
|
||||
msgwheader->resizeSection ( 3, 140 );
|
||||
|
||||
/* Set header resize modes and initial section sizes */
|
||||
QHeaderView * msglheader = ui.msgList->header () ;
|
||||
@ -381,7 +383,7 @@ void MessagesDialog::insertMessages()
|
||||
QDateTime qtime;
|
||||
qtime.setTime_t(it->ts);
|
||||
QString timestamp = qtime.toString("yyyy-MM-dd hh:mm:ss");
|
||||
item -> setText(0, timestamp);
|
||||
item -> setText(3, timestamp);
|
||||
}
|
||||
|
||||
// From ....
|
||||
@ -397,7 +399,7 @@ void MessagesDialog::insertMessages()
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << it -> count;
|
||||
item -> setText(3, QString::fromStdString(out.str()));
|
||||
item -> setText(0, QString::fromStdString(out.str()));
|
||||
}
|
||||
|
||||
item -> setText(4, QString::fromStdString(it->srcId));
|
||||
@ -662,3 +664,4 @@ void MessagesDialog::printpreview()
|
||||
preview->setAttribute(Qt::WA_DeleteOnClose);
|
||||
preview->show();
|
||||
}
|
||||
|
||||
|
@ -751,7 +751,10 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
<column>
|
||||
<property name="text" >
|
||||
<string>Date</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/attachment.png</iconset>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
@ -766,7 +769,7 @@ p, li { white-space: pre-wrap; }
|
||||
</column>
|
||||
<column>
|
||||
<property name="text" >
|
||||
<string>#Recommendations</string>
|
||||
<string>Date</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
|
@ -119,6 +119,7 @@
|
||||
<file>images/graph-area.png</file>
|
||||
<file>images/graph-line.png</file>
|
||||
<file>images/hide_toolbox_frame.png</file>
|
||||
<file>images/highlight.png</file>
|
||||
<file>images/info16.png</file>
|
||||
<file>images/informations_24x24.png</file>
|
||||
<file>images/invite-friend24.png</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/highlight.png
Normal file
BIN
retroshare-gui/src/gui/images/highlight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in New Issue
Block a user