Opened 9 years ago

Closed 8 years ago

#7132 closed enhancement (fixed)

Deskbar Resize Team Icons

Reported by: jscipione Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/Deskbar Version: R1/Development
Keywords: Cc: superstippi@…
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

Who likes big icons?

This patch adds a slider to the Deskbar which allows you to resize the Deskbar icons in vertical mode from 16x16 (the default) to 64x64 by 16x16 pixel increments.

Attachments (2)

Deskbar Resize Team Icons 4.diff (8.3 KB ) - added by jscipione 9 years ago.
Resize Deskbar Icons Patch
Deskbar Resize Team Icons 5.diff (23.4 KB ) - added by jscipione 8 years ago.
Make improvements suggested by axeld and collapse to just icon in horizontal mode when the bar gets too wide.

Download all attachments as: .zip

Change History (12)

by jscipione, 9 years ago

Resize Deskbar Icons Patch

comment:1 by jscipione, 9 years ago

Has a Patch: set

comment:2 by axeld, 9 years ago

I'm not sure I like the idea in general, as the Deskbar looks quite clumsy with larger icon sizes, there are also a number of minor issues with your patch:

  • When a new application is launched, the menu entry is only as large as the text, and only suddenly grows bigger a bit later -- this doesn't look good.
  • The icon size choices are pretty arbitrary, and could probably use a few in-between sizes, like 24x24. I would also like to actually see the size on screen, like in the Tracker icon menu.
  • It doesn't work for the horizontal layout, but never tells you (ie. it won't even disable the settings).
  • It would look much better if the other icons, as well as the leaf would scale as well. At least for the tray this probably cannot be done in a compatible way (haven't given it much thought, though).
  • An option to change the width as well would make sense, as the whole thing looks strange when its so narrow.
  • I would not store the internal (1) but the actual size (16). One could make the size automatically depend on the font size used by default.
  • The slider should also set its modification message in order to have a live update (instead of only when you release the mouse button).
  • There are some minor coding style issues: in BarApp.cpp line 303 there is no need to wrap the line as the resulting line isn't even 80 characters wide (there are other lines there that have the same fault, though). Line 729 needs curly braces, as the statement in the if-clause is more than one line long.

The TBarApp::FetchAppIcon() method could be simplified a bit this way:

icon_size size = fBarView->Vertical() && icon->Bounds().IntegerHeight() > 15 ? B_LARGE_ICON : B_MINI_ICON;

However, this is overridden anyway when you pass 32 bit bitmaps, so you can just always specify B_LARGE_ICON. The rest of the patch looks good IMO.

comment:3 by jscipione, 9 years ago

Thank you for your feedback axeld!

When a new application is launched, the menu entry is only as large as the text, and only suddenly grows bigger a bit later -- this doesn't look good

I never noticed that, this is probably due to the icon being fetched at the default size (16x16) and then re-sized to the size specified by the setting moments later. I'll see if I can get new applications to fetch at the size from your settings initially.

The icon size choices are pretty arbitrary

I chose the icon sizes to kinda-sorta match those in Tracker (16x16, 32x32, 40x40, 48x48, 64x64), however, what I could do is make the slider increment by 8px instead of 16px to give you the following size choices: 16x16, 24x24, 32x32, 40x40, 48x48, 56x56, and 64x64.

It doesn't work for the horizontal layout, but never tells you (ie. it won't even disable the settings).

This is true, but I considered it okay because neither do the other options like "Show Application Expander" or "Expand New Applications" which only work in Vertical Expando mode and yet don't indicate that in any way. I guess 2 wrongs do not make a right. Perhaps this would be a good time to rethink the preference window layout to indicate which options work in which modes.

An option to change the width as well would make sense, as the whole thing looks strange when its so narrow.

I was afraid that people would bulk if I changed the width of the Deskbar so I left it alone. One issue with the fixed width Deskbar is that at larger icon sizes long application names truncate which looks bad. This is true even before my patch but was less noticable. I could expand the width of the Deskbar proportional to the icon size if you think that would be a better solution.

I would not store the internal (1) but the actual size (16). One could make the size automatically depend on the font size used by default.

Agreed, I did this only to placate the slider, but you are right, I should store the actual icon size.

The slider should also set its modification message in order to have a live update (instead of only when you release the mouse button).

I did that in an earlier version of the patch but I reverted it because resizing was slow when you had many applications open at once, but, I shall enable that once again.

in BarApp.cpp line 303 there is no need to wrap the line as the resulting line isn't even 80 characters wide (there are other lines there that have the same fault, though)

Yes, I noticed that and copied the mistake of the other lines, I shall fix it in the next revision of the patch. I'll also fix the other errors you mentioned.

The TBarApp::FetchAppIcon() method could be simplified

I agree, that is much simpler, I will do that.

However, this is overridden anyway when you pass 32 bit bitmaps, so you can just always specify B_LARGE_ICON.

This is true only for HVIF-based Haiku icons, not for bitmap-based BeOS icons which will use a different bitmap depending on if B_LARGE_ICON or B_MINI_ICON is requested.

comment:4 by humdinger, 9 years ago

Here's another idea regarding Deskbar and its icon size (see also #4971). Using CTRL-ALT-right-click-resizing, horizontal resizing could resize Deskbar's width, as expected. Vertical resizing would then determine icon size. The min-size would be the current Deskbar appearance.

in reply to:  4 comment:5 by axeld, 9 years ago

Replying to humdinger:

Here's another idea regarding Deskbar and its icon size (see also #4971). Using CTRL-ALT-right-click-resizing, horizontal resizing could resize Deskbar's width, as expected. Vertical resizing would then determine icon size. The min-size would be the current Deskbar appearance.

I don't like that as much, as it's too inexact for my taste - icons usually look sharp at specific sizes, and you would try to stick to those. I would like to be able to resize the Deskbar this way in the horizontal direction, though.

comment:6 by humdinger, 9 years ago

True. Maybe it could snap to 8n pixels on vertical resize.

in reply to:  6 ; comment:7 by jscipione, 9 years ago

Replying to humdinger:

True. Maybe it could snap to 8n pixels on vertical resize.

Do we really want to do this at all though? The Deskbar "window" is not resizable, in that it has the B_NOT_RESIZABLE flag set. The ctrl+alt functionality should respect that flag and not try and resize the window. I am working on an updated patch that will resize the window both horizontally and vertically based on the user's icon size slider setting (right now it only adjusts the window horizontally). So the slider gives the user limited control over the windows size. By implementing the ctrl+alt resize functionality in Deskbar we would give the user the ability to control the windows height and width much more dramatically, and I think that is a bad thing. The Deskbar should be as wide as it needs to be and no more. Perhaps the user-interface could allow for resizing the window in a different way than a slider, but using the ctrl+alt resize functionality for this is misplaced.

My main worry for this feature is that the larger icons may make the Deskbar too wide, not that we need to allow the user to make the Deskbar window wider! One option that was suggested to me would be to allow the user to get rid of the Application name labels, replaced them with a tooltip when one hovers the mouse over the icon. This might be a good way to go to allow for wider icons without making the Deskbar itself too wide.

in reply to:  7 comment:8 by axeld, 9 years ago

Replying to jscipione:

Do we really want to do this at all though? The Deskbar "window" is not resizable, in that it has the B_NOT_RESIZABLE flag set. The ctrl+alt functionality should respect that flag and not try and resize the window.

Sure it should respect that - the Deskbar should then only have the B_NOT_V_RESIZABLE flag set (or whatever it's called). In addition to the ctrl-alt method, I would indeed add another slider to the configuration panel that would be the more obvious way to change the size.

My main worry for this feature is that the larger icons may make the Deskbar too wide, not that we need to allow the user to make the Deskbar window wider!

But why not simply let the user decide this on his own?

One option that was suggested to me would be to allow the user to get rid of the Application name labels, replaced them with a tooltip when one hovers the mouse over the icon.

I like that as an option. A possible next step would then be to integrate the LaunchBox into the Deskbar, and then to be able to make items sticky (and even change their position).

by jscipione, 8 years ago

Make improvements suggested by axeld and collapse to just icon in horizontal mode when the bar gets too wide.

comment:9 by stippi, 8 years ago

Cc: superstippi@… added

comment:10 by jscipione, 8 years ago

Resolution: fixed
Status: newclosed

Feature implemented in hrev43964

Note: See TracTickets for help on using tickets.