-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ricochet's icon in tray #260
base: master
Are you sure you want to change the base?
Conversation
Add to preferences option which changes behaviour of Close button from closing application to hiding MainWindow.
If MainWindow is hidden, slot for contact signal in main.qml changes visibility of MainWindow first.
@@ -67,6 +68,8 @@ MainWindow::MainWindow(QObject *parent) | |||
Q_ASSERT(!uiMain); | |||
uiMain = this; | |||
|
|||
trayIcon = new TrayIcon(QIcon(QLatin1String(":/icons/ricochet.svg")), QIcon(QLatin1String(":/icons/ricochet_unread.svg"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trayIcon is leaked on destruction
I think the tray icon should only be visible when close-to-tray is enabled. We could also make a separate option, but I like that less. What do you think? Looking good - I think this can be ready to merge after the above comments. |
1. Destruction of TrayIcon object in MainWindow's destructor 2. Forward declaration of TrayIcon in src/ui/MainWindow.h 3. QIcon objects for TrayIcon's constructor as const references 4. New names for TrayIcon's signals, removes unnecessary slots and connects signals from TrayIcon's context menu to another signals 5. Fixes braces style: brace in the same line as if/else in QML 6. Title case in TrayIcon's context menu
Ok. I think everything's done. |
TrayIcon(const QIcon& std_icon, const QIcon& unread_icon); | ||
~TrayIcon(); | ||
|
||
void setStdIcon(QIcon std_icon); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are unused?
1. Removes unused TrayIcon::setStdIcon and TrayIcon::setUnreadIcon 2. Removes code formatting issues
I hope now it's ok :) |
thanks :) |
looks good :) |
It's about time to merge :) |
Is it in master? |
Not yet, but it's ready since end of September. |
Toggling the window when the tray icon is clicked doesn't behave well. On some platforms, the window is hiding every time you click to open the context menu on the tray. How do most messaging-type applications behave here? It's less important, but the unread icon is too subtle, also. Maybe recoloring the entire icon to orange would be better. We could merge without that. We should disable tray icons entirely on OS X. Adding a |
For example Pidgin and Psi open and close the main window on single click. Right click opens the context menu. |
Single click is the best Windows practice, agree |
The only think that could be done is new 'unread icon'. After merging this branch into master we can make an issue. Maybe we have anybody who is better in graphics than me ;) |
what about simply flashing the already existing tray icon when there are unread messages? |
I think it could be done. What do you think, should it be default behaviour or just an option? |
I still think the best way is using a special icon for unread incoming messages, and here is why: |
We have special icon with dot. It's not very effective and I wanted to change it. I didn't know if it is enough to set new, more different icon or make it flash. |
I've changed unread icon and add blinking when we have unread messages. We need someone who will make this feature available on os x. |
Features:
This PR is related to issue #247