History log of /haiku/src/kits/tracker/IconMenuItem.cpp
Revision Date Author Comments
# 72e4928f 31-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

Tracker & desklink: Pass -1 to GetTrackerIcon for sizing.

It can just deduce the size from the passed BBitmap if we do this.
Simplifies the code somewhat.


# 0c973c94 26-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Refactor IconCache size handling and usages.

* Instead of taking an icon_size, which we were having to cast
random integers to anyway, just take a BSize and convert internally
as needed. This simplifies a lot of usages of IconCache methods.

* Compute what B_MINI_ICON size will be at startup. This way,
we do not wind up caching "mini" icons in the fLarge*Icon variables
under HiDPI.

This does have a downside that if anything actually
does try to fetch "true mini" (16x16) icons when the real
ComposeIconSize(B_MINI_ICON) is larger than that, it will wind up
(confusingly) in fLarge*Icon, but that should not cause problems
and after this commit should not happen at all, anyway.

* Make mini-icon-mode use ComposeSize instead of the hardcoded 16x16,
and adjust metrics computations around it.

* Fetch larger icons in MountMenu logic. Also use BString::SetToFormat.

* Remove an unused, deprecated method from BPoseView.

* Rename variables in thumbnail generation code to match new behavior.


# 1be85605 25-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

Add casts to appease GCC2 following recent changes.


# 3efde1bf 25-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: Use BControlLook::ComposeIconSize.

One computation was functionally equivalent to the new method,
other places were not scaling icons at all.

Fixes #13177.


# b791e997 05-Nov-2018 Axel Dörfler <axeld@pinc-software.de>

Tracker: Improved NavIcon spacing

* The spacing between icon and text now scales with the font size, too.


# a55e9f52 05-Nov-2018 Axel Dörfler <axeld@pinc-software.de>

Tracker: NavMenu icons scale with font size

* Moved icon size computation into separate utility function.


# 9d37e741 31-Jul-2016 John Scipione <jscipione@gmail.com>

Tracker FindPanel: Make a copy of fDeviceIcon

... so that it gets deleted by destructor and not the original


# 717b47e7 31-Jul-2016 John Scipione <jscipione@gmail.com>

Tracker: Style fixes

indentation, spaces, explicitly compare to B_OK


# d8c4f7b5 31-Jul-2016 John Scipione <jscipione@gmail.com>

IconMenuItem: Make icon_size B_MINI_ICON by default


# caf0a129 11-Apr-2016 John Scipione <jscipione@gmail.com>

Tracker: Draw IconMenuItem in closed state

Add an Icon() and SetIcon() method. Override SetMarked() to set the
parent menu field icon.

Don't move the label right if icon is NULL. Make the first menu item
an IconMenuItem with a NULL icon. This allows the icon to draw in the
closed menu state.

icon gets updated even if you select an item in a submenu


# 2f5fe16a 14-Feb-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: delete #ifndef __HAIKU__ code.

Since tracker_layout has been merged, this is pretty useless now.
Should result in no change to generated assembly.


# ae7d51b2 02-Jul-2014 John Scipione <jscipione@gmail.com>

Tracker: Style fixes to IconCache and Utilities


# ba50b2c2 20-Jun-2014 John Scipione <jscipione@gmail.com>

Tracker: style fixes to IconMenuItem


# b05aa8b5 27-Jul-2012 John Scipione <jscipione@gmail.com>

Style changes in Tracker, no functional change.

Manual whitespace cleanup
Change instances of const char * to const char*
Convert /* */ C style comments to // C++ style comments


# d125d984 21-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* IconMenuItem now falls back to the icon of the super type, if a MIME type
didn't have one.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27144 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 741b3d90 17-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

Use B_RGBA32 instead of B_RGB32 when getting vector icons. Should fix bug #2525.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26474 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63d6bf7a 26-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

* Applied patch by Jonas to have 32-bit icons in the mount and template menus
under Haiku. This fixes bug #1033. Thanks!
* Changed IconMenuItem sizing to use the same method as ModelMenuItem which
makes sure the item is large enough for the icon, and which centers the icon
in case the item is higher than the icon.
* Minor cleanup, added some comments about where those classes are used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20240 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e20af02a 14-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

* now draws disabled icons fine when they are B_RGBA32


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18847 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cd94fdda 28-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Tracker wrote icons with the wrong type at several places.
* Also replaced all B_COLOR_8_BIT with the B_CMAP8 constant.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16909 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 02be5353 22-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added libtracker.so to the repository and the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12772 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f5fe16a3e5f838f26b296a2f2926cce407f014f 14-Feb-2015 Augustin Cavalier <waddlesplash@gmail.com>

Tracker: delete #ifndef __HAIKU__ code.

Since tracker_layout has been merged, this is pretty useless now.
Should result in no change to generated assembly.


# ae7d51b28a8826a1f8330f28dead633d98cc42bd 02-Jul-2014 John Scipione <jscipione@gmail.com>

Tracker: Style fixes to IconCache and Utilities


# ba50b2c229216df48fdad169c54afa81e20844af 20-Jun-2014 John Scipione <jscipione@gmail.com>

Tracker: style fixes to IconMenuItem


# b05aa8b5b16e5b4f420a35c37805c6387df98737 27-Jul-2012 John Scipione <jscipione@gmail.com>

Style changes in Tracker, no functional change.

Manual whitespace cleanup
Change instances of const char * to const char*
Convert /* */ C style comments to // C++ style comments


# d125d984a631d7bbe18a2e0f7c52921ab27fb881 21-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* IconMenuItem now falls back to the icon of the super type, if a MIME type
didn't have one.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27144 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 741b3d900407a351d228e11d6e7a2b1dfed1f2f3 17-Jul-2008 Michael Lotz <mmlr@mlotz.ch>

Use B_RGBA32 instead of B_RGB32 when getting vector icons. Should fix bug #2525.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26474 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 63d6bf7ad8d9209244d226fcc1a7391be7d2a98b 26-Feb-2007 Axel Dörfler <axeld@pinc-software.de>

* Applied patch by Jonas to have 32-bit icons in the mount and template menus
under Haiku. This fixes bug #1033. Thanks!
* Changed IconMenuItem sizing to use the same method as ModelMenuItem which
makes sure the item is large enough for the icon, and which centers the icon
in case the item is higher than the icon.
* Minor cleanup, added some comments about where those classes are used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20240 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e20af02a1de215edb7903104359f1b81fb91a564 14-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

* now draws disabled icons fine when they are B_RGBA32


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18847 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cd94fddab267dad9683764eb2606994ae38479c0 28-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* Tracker wrote icons with the wrong type at several places.
* Also replaced all B_COLOR_8_BIT with the B_CMAP8 constant.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16909 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 02be5353fd41ea40007a382e13f007eaf6b5a3a0 22-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added libtracker.so to the repository and the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12772 a95241bf-73f2-0310-859d-f6bbb57e9c96