[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] QSystemTrayIcon - can you change the size/aspect?
From: Brian Knudson <briank () pipelinefx ! com>
Date: 2012-07-09 18:05:15
Message-ID: F86AB017-37C9-42E4-9EDB-B3C7700F37C1 () pipelinefx ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Jul 9, 2012, at 10:51 AM, Glenn Linderman wrote:
> On 7/9/2012 10:43 AM, Brian Knudson wrote:
> > As an example, I'm looking at Adobe updater's system tray icon. It has the Adobe \
> > logo & a number next to it that denotes the number of updates available. In \
> > order to do this, the icon is wider than it is tall.
> > screen shot: http://churchofbk.com/misc/tray_icon.png
> >
> > I would love to be able to do this with one of my apps, as the whole point of the \
> > app is to make a certain number of cores available to some other process - so it \
> > becomes much more usable as a tray icon if it shows the number of available cores \
> > at any one time.
> > With that, can the size/geometry of a QSystemTrayIcon be changed so that it isn't \
> > square? If I try to give it a non-square image, it gets scaled while maintaining \
> > aspect ratio until it fits in a 16x16 or 22x22 box.
>
> Are you sure that Adobe isn't using two adjacent system tray icons? That was my \
> first impression when I looked at your screen shot. But your screen shot doesn't \
> look like a Windows system tray, is it Linux or something? I didn't even know \
> anything but Windows had system trays...
It's OS X. I don't believe it's called a "System tray" in OS X, but as far as Qt is \
concerned, it's the area where QSystemTrayIcons go.
I had initially thought that it was 2 icons as well, but that doesn't *appear* to be \
the case - the whole thing highlights on click & the menu always appears in the same \
place, regardless of where I click. I suppose there could be quite a bit of trickery \
at play here, but I wanted to ask before I started investigating if it's worth trying \
to use two icons & make them appear as one.
-Brian
[Attachment #5 (unknown)]
<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; "><br><div><div>On Jul 9, 2012, at 10:51 AM, \
Glenn Linderman wrote:</div><br class="Apple-interchange-newline"><blockquote \
type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#330033">
<div class="moz-cite-prefix">On 7/9/2012 10:43 AM, Brian Knudson
wrote:<br>
</div>
<blockquote cite="mid:33A4E73D-25E7-4223-AEE4-3C1996AB7CAB@pipelinefx.com" \
type="cite">As an example, I'm looking at Adobe updater's system
tray icon. It has the Adobe logo & a number next to it that
denotes the number of updates available. In order to do this, the
icon is wider than it is tall.
<div><br>
</div>
<div>screen shot: <a moz-do-not-send="true" \
href="http://churchofbk.com/misc/tray_icon.png">http://churchofbk.com/misc/tray_icon.png</a><br>
<div><br>
</div>
<div>I would love to be able to do this with one of my apps, as
the whole point of the app is to make a certain number of
cores available to some other process - so it becomes much
more usable as a tray icon if it shows the number of available
cores at any one time. </div>
<div><br>
</div>
<div>With that, can the size/geometry of a QSystemTrayIcon be
changed so that it isn't square? If I try to give it a
non-square image, it gets scaled while maintaining aspect
ratio until it fits in a 16x16 or 22x22 box.<br>
</div>
</div>
</blockquote>
<br>
Are you sure that Adobe isn't using two adjacent system tray icons?
That was my first impression when I looked at your screen shot. But
your screen shot doesn't look like a Windows system tray, is it
Linux or something? I didn't even know anything but Windows had
system trays...<br>
</div>
</blockquote></div><br><div>It's OS X. I don't believe it's called a "System \
tray" in OS X, but as far as Qt is concerned, it's the area where QSystemTrayIcons \
go. </div><div><br></div><div>I had initially thought that it was 2 icons as \
well, but that doesn't *appear* to be the case - the whole thing highlights on click \
& the menu always appears in the same place, regardless of where I click. I \
suppose there could be quite a bit of trickery at play here, but I wanted to ask \
before I started investigating if it's worth trying to use two icons & make them \
appear as one.</div><div><br></div><div>-Brian</div></body></html>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic