mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-12 00:00:44 -04:00
Added new Gui Design changes from Pheonom, Added new ListWidget for Page selection, via settings can switch to use List or Toolbar AddFrameListeInsteadOfToolBar_v0.6_7357.patch
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7360 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
31962ea0c5
commit
bcff888eb7
27 changed files with 1174 additions and 493 deletions
|
@ -28,29 +28,34 @@
|
|||
|
||||
UserNotify::UserNotify(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
mMainToolButton = NULL;
|
||||
mMainAction = NULL;
|
||||
mTrayIcon = NULL;
|
||||
mNotifyIcon = NULL;
|
||||
mNewCount = 0;
|
||||
{
|
||||
mMainToolButton = NULL;
|
||||
mMainAction = NULL;
|
||||
mListItem = NULL;
|
||||
mTrayIcon = NULL;
|
||||
mNotifyIcon = NULL;
|
||||
mNewCount = 0;
|
||||
mLastBlinking = false;
|
||||
|
||||
connect(rApp, SIGNAL(blink(bool)), this, SLOT(blink(bool)));
|
||||
}
|
||||
|
||||
void UserNotify::initialize(QToolBar *mainToolBar, QAction *mainAction)
|
||||
{
|
||||
mMainAction = mainAction;
|
||||
if (mMainAction) {
|
||||
connect(rApp, SIGNAL(blink(bool)), this, SLOT(blink(bool)));
|
||||
}
|
||||
|
||||
void UserNotify::initialize(QToolBar *mainToolBar, QAction *mainAction, QListWidgetItem *listItem)
|
||||
{
|
||||
mMainAction = mainAction;
|
||||
if (mMainAction) {
|
||||
mButtonText = mMainAction->text();
|
||||
if (mainToolBar) {
|
||||
mMainToolButton = dynamic_cast<QToolButton*>(mainToolBar->widgetForAction(mMainAction));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UserNotify::createIcons(QMenu *notifyMenu)
|
||||
mMainToolButton = dynamic_cast<QToolButton*>(mainToolBar->widgetForAction(mMainAction));
|
||||
}
|
||||
}
|
||||
mListItem = listItem;
|
||||
if (mListItem && !mMainAction) {
|
||||
mButtonText = mMainAction->text();
|
||||
}
|
||||
}
|
||||
|
||||
void UserNotify::createIcons(QMenu *notifyMenu)
|
||||
{
|
||||
#define DELETE_OBJECT(x) if (x) { delete(x); x = NULL; }
|
||||
|
||||
|
@ -91,12 +96,20 @@ void UserNotify::updateIcon()
|
|||
|
||||
QFont font = mMainAction->font();
|
||||
font.setBold(count > 0);
|
||||
mMainAction->setFont(font);
|
||||
}
|
||||
|
||||
if (mMainToolButton) {
|
||||
mMainToolButton->setStyleSheet((count > 0) ? "QToolButton { color: #E21D3A; }" : "");
|
||||
|
||||
mMainAction->setFont(font);
|
||||
}
|
||||
|
||||
if (mListItem) {
|
||||
mListItem->setIcon(getMainIcon(count > 0));
|
||||
mListItem->setText((count > 0) ? QString("%1 (%2)").arg(mButtonText).arg(count) : mButtonText);
|
||||
|
||||
QFont font = mListItem->font();
|
||||
font.setBold(count > 0);
|
||||
mListItem->setFont(font);
|
||||
}
|
||||
if (mMainToolButton) {
|
||||
mMainToolButton->setStyleSheet((count > 0) ? "QToolButton { color: #E21D3A; }" : "");
|
||||
|
||||
QFont font = mMainToolButton->font();
|
||||
font.setBold(count > 0);
|
||||
mMainToolButton->setFont(font);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue