History log of /haiku/src/apps/deskbar/BarMenuBar.cpp
Revision Date Author Comments
# fb885767 04-May-2023 John Scipione <jscipione@gmail.com>

Deskbar: Use hvif window icons & scale with font

Add vector rdefs for shown, hidden, shown switch
and hidden switch icons. Remove unused bitmap
resources. Add window switch vector icons to
artwork.

Create window icon cache in TBarApp and cache the
window icons based on font size.
Fixes memory leak in #18357.

Don't draw off-workspace lines in Switcher, use
switch icon for that instead. Fixes crash reported
in #18359. Position icon and window name better in
Switcher.

Put BarTeamInfo icon parameter last and make it
optional, the icon gets set by caching.

Enable team icon cache and window icon cache.

Fixes #14694

Deskbar: Scale Twitcher icons based on font size

Remove the point ctor parameter and deprecate the
switcherLoc setting by not using or setting it and
leaving it at its default value.

Center window on screen resolution change and
workspace change (as resolution may not match).

Fixes #17924

Change-Id: Ib63cc307f14cda397ffb66ea74091be59e6e5535
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6335
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 27b3dee8 11-Apr-2023 John Scipione <jscipione@gmail.com>

Revert "Deskbar: Use hvif window icons & scale with font"

This reverts commit 2b65e2d808b31a146569dd270b0e3fc0673471ba.


# 2b65e2d8 26-Mar-2023 John Scipione <jscipione@gmail.com>

Deskbar: Use hvif window icons & scale with font

Add rdef vector icons for shown, hidden, shown switch and
hidden switch. Reuse resource ids for vector icons. Remove
unused bitmap resources.

Fixes #17918.

Change-Id: I2ba1b126422f679c91f3272991c78d236198a358
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6260
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 863bf67d 02-Apr-2023 John Scipione <jscipione@gmail.com>

Deskbar: Scale leaf/team menu with bold font only

Note that this only affects the leaf and team menu item icon size
as we do not actually display any bold text here and this does not
cause any menu text to display as bold anywhere in Deskbar.

The reason to use bold font is because the leaf/team menu is set
to the same height as the window tab and the window tab is bold.

Fixes #17913

Change-Id: I8fd23e30e9a28e6aa24b4726c73863b9d0370010
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6297
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Automation <automation@haiku-os.org>


# b5c9fb39 18-Mar-2020 John Scipione <jscipione@gmail.com>

Deskbar: Increase MenuBar width by 1px

... so that you can click it on the screen edge in vertical mode on
the right side. The BarMenuBar was 1px too narrow and didn't take up
the last pixel of its parent BarView container and therefore wouldn't
open the menu on click on the last pixel.

MenuBar width is increased by 1px in all modes but you probably won't
be able to notice the difference in other modes.

NULL comparison style fix and floorf call to prevent non-integer width
are included.

Fixes #15813

Change-Id: Ic5ebef5a63846a397a55358a111e33987538c455
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2377
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 0d2645e4 19-Nov-2019 John Scipione <jscipione@gmail.com>

Deskbar: New single line mini-mode

Mini-mode is when Deskbar is in the 4 corners with the application
menu tucked away into the leaf menu bar. This commit changes mini-
mode from putting the clock and replicants below the leaf menu to
attaching them to the side forming a single line.

The main advantage of this is that if Deskbar is in the top right
corner you can maximize a window without losing any access to
Deskbar or any screen real-estate. The other three corners lose screen
real-estate similar to horizontal mode.

Replace team icon with HVIF version kindly donated by meanwhile.
Scale icon size according to font size. Grow the vector rendered icon
size by 1px to match bitmap size. Add Team_Registrar icon to
data/artwork/icons. Tweak Team_Registrar icon to match the area of the
bitmap taken up by the bitmap icon so they will render at the same size.
The bitmap can be now NULL if an invalid icon is passed, handle this
case with an fInitStatus member in BarMenuTitle.

Switch order of leaf and team menus on the left side so that the
team menu is always on the screen edge. The team menu is more in
need of quick corner access than the leaf menu in this mode.

Adjust leaf menu position so that it continues to be cut-off while
allowing the team menu icon to display normally. Center vertically in
horizontal mode but it's still cut-off at 16x16. In vertical mode the
leaf continues to be cut-off at all font sizes. Constrain leaf bitmap
to its menu item frame as it can bleed out into the adjacent team menu
item at larger font sizes.

Grow team menu items to fit the widest label up to the max vertical
expando window width (currently 2x min) before truncating.
LegacyPackageInstaller now fits in the team menu. More on
LegacyPackageInstaller in horizontal mode below.

Update SetSizeLimits for mini-mode - no upper limit on height or width.

Switch to mini-mode using 1/4 screen left and right of screen instead
of using 1/6. Mini mode is now wider and this change makes switching
between mini mode and horizontal mode more reliable.
* Rename frame to screenFrame here for clarity.

Set menu bar height to window tab height in vertical mode. This is
so that when you maximize a window the tab size will match. The menu
bar height is also a few pixels taller (25px vs 21px) than it was in
vertical expando mode at the default 12px font size. The change was
made to match the tab height. 21px was the height of a window tab
on BeOS R5's default decorator.

Adjust the width of the team menu for larger icon sizes. If app
names are hidden limit to half of min width so the menu doesn't
appear too short. SetMaxContentSize to width, this fixes a bug where
the menu item wasn't quite the right size for the menu.

No longer truncate time in vertical mini mode because the time can now
expand itself horizontally without limit (within reason.)

Center replicants vertically in mini-mode based on tab height and max
replicant height. Simplify mini-mode menu width and position calculation.
Fix a bar menu bar placement bug when Deskbar starts hidden in mini-mode.

Fix numerous layout issues. Put replicant tray where it should be in all
modes and then start adjusting things. The Replicant tray is now where
it should be in all modes, any fiddling with replicant icon locations
now can be relegated solely to LocationForReplicant().

Implements bug #5876 step 1.

*** Other related Deskbar improvements also made in this commit ***

Implemented underflow in horizontal mode ExpandoMenuBar to make items
wider when you close a team to take up more of available space. Max item
width is currently set to 1.25x min width so that LegacyPackageInstaller
fits in horizontal mode as well. In team menu it make sense to calculate
the widest label but in horizontal mode it would not be very nice if
ARogueAppWithAVeryVeryLongAndAnnoyingName were to grow all of your team
menu items. 1.25x is a fair compromise that gets us some extra width but
not too much. ExpandoMenuBar will truncate items to minimum width to buy
some space before it turns on the scroll arrows. Eliminate
kMinMenuItemWidth, create convinience methods to calculate limits.

Add BarView pointer to TimeView. Ditch fVertical and SetOrientation
in TTimeView and get the information from BarView instead. This way
we don't have to keep the state in sync. Also pass BarView pointer to
TTeamMenu constructor and use it instead of getting the pointer in a
roundabout way from be_app.

Eliminate kMiniHeight constant, the mini-mode height is now based
on the height of a window tab which changes with be_bold_font size.
Limit maximum height of replicants by be_bold_font size as well.
Also limit team menu and leaf menu icon heights by be_bold_font size.

Eliminate TExpandoMenuBar::fVertical, use fBarView instead. Switch the
order of layout and barView in ctor so that barView can be optional.
Change the ctor vertical param to layout and use the passed-in menu_layout
to pass to BMenuBar only. Once TExpandoMenuBar has been constructed, use
fBarView from then on. In Deskbar the menu_layout can change via
BMenuPrivate::SetLayout, if we needed to know TExpandoMenuBar's menu_layout
for some reason, we can call Layout().

Maintain 2px border around replicants in vertical expando mode on all
sides. Maintain 2px border around replicants in horizontal mode, except for
at 16x16 reduce the border to 1px because we're really short on height.
Improve clock centering in vertical expando mode. Also improve clock
centering in mini-mode across all font sizes. Reduce clock height by 2px
so that it won't draw over the top and bottom borders in horizontal mode.

Refactor TBarView::PlaceTray(). The code is basically the same but the
method is now better layed out. Calculate resize dragger location based
on width setting. This is valid since it is only ever used in vertical
expando mode. Hide the resize control better by moving it off-screen
when not in use. Hide() alone was not enough.

Fix size and position of the drag region to prevent minor drawing glitches
that were occuring in horizontal and left vertical mode because the drag
region was not in quite the right size and place.

Call DrawDragger() from DrawAfterChildren() instead of Draw() (and set
B_DRAW_ON_CHILDREN flag) so that the dragger will always be drawn even if
there are other items on top. In theory this should not be needed but in
practice this fixes a few drawing glitches. Rename DrawDragRegion() to
private DrawDragger() method - the name was confusing and other classes
shouldn't be allowed to draw the dragger directly.

TDragRegion should be renamed to TStatusView since that's what it really is.
Then we should create a new TDragControl class based on TResizeControl that
is a child of TStatusView like everybody else. TDragControl would be
responsible for drawing itself and knowing where its bounds are. For now
DrawAfterChildren() will have to do.

Rework status tray border drawing. It is identical in vertical exando mode
and in the same spirit in horizontal mode just a little bit nicer looking.
Draw hilight on top, left, and bottom edges in horizontal mode. Draw hilight
on top, and left edges in mini-mode this creates the appearance of a shadow.
Best appreciated using Magnify.

May the following (Open Tracker License) code forever be memorialized in
this commit message:

void
TDragRegion::Draw(BRect updateRect)
{
rgb_color menuColor = ViewColor();
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
rgb_color ldark = tint_color(menuColor, 1.02);
rgb_color dark = tint_color(menuColor, B_DARKEN_2_TINT);
rgb_color vvdark = tint_color(menuColor, B_DARKEN_4_TINT);
rgb_color light = tint_color(menuColor, B_LIGHTEN_2_TINT);

BRect frame(Bounds());
BeginLineArray(4);

if (be_control_look != NULL) {
if (fBarView->Vertical()) {
AddLine(frame.LeftTop(), frame.RightTop(), dark);
AddLine(BPoint(frame.left, frame.top + 1),
BPoint(frame.right, frame.top + 1), ldark);
AddLine(frame.LeftBottom(), frame.RightBottom(), hilite);
} else if (fBarView->AcrossTop() || fBarView->AcrossBottom()) {
AddLine(frame.LeftTop(),
BPoint(frame.left, frame.bottom), dark);
AddLine(BPoint(frame.left + 1, frame.top + 1),
BPoint(frame.right - 1, frame.top + 1), light);
AddLine(BPoint(frame.right, frame.top + 2),
BPoint(frame.right, frame.bottom), hilite);
AddLine(BPoint(frame.left + 1, frame.bottom),
BPoint(frame.right - 1, frame.bottom), hilite);
}
} else {
if (fBarView->Vertical()) {
AddLine(frame.LeftTop(), frame.RightTop(), light);
AddLine(frame.LeftTop(), frame.LeftBottom(), light);
AddLine(frame.RightBottom(), frame.RightTop(), hilite);
} else if (fBarView->AcrossTop()) {
AddLine(BPoint(frame.left, frame.top + 1),
BPoint(frame.right - 1, frame.top + 1), light);
AddLine(frame.RightTop(), frame.RightBottom(), vvdark);
AddLine(BPoint(frame.right - 1, frame.top + 2),
BPoint(frame.right - 1, frame.bottom - 1), hilite);
AddLine(frame.LeftBottom(),
BPoint(frame.right - 1, frame.bottom), hilite);
} else if (fBarView->AcrossBottom()) {
AddLine(BPoint(frame.left, frame.top + 1), BPoint(frame.right - 1, frame.top + 1), light);
AddLine(frame.LeftBottom(), frame.RightBottom(), hilite);
AddLine(frame.RightTop(), frame.RightBottom(), vvdark);
AddLine(BPoint(frame.right - 1, frame.top + 1),
BPoint(frame.right - 1, frame.bottom - 1), hilite);
}
}

EndLineArray();
}

Refactor mode switching.

Change TDragRegion::SwitchModeForRect() to SwitchModeForRegion() and pass
in BRegion's instead of BRect's. Create a new CalculateRegions() method
which is called once at startup and again on ScreenChanged() instead of
calculating the rect's over and over again inside MouseMoved(). Simplify
calculations using BRegion's.

Get the screen_where parameter from the Window()'s CurrentMessage() instead
of converting the passed in where parameter to screen coordinates. This
makes mode switching work 100% better.

Restore full state, fix all issues, and disable it again.

Fix issue with the window not resizing itself correctly when hiding the
scroller arrows in vertical expando mode because Deskbar was using the
bottom value of a scrolled view rather than its height. We only need to
call CheckForScrolling() once before we resize the window. Consolidate all
the window resizing code into ExpandoMenuBar::SizeWindow(), call
CheckForScrolling() there one time, then resize the window and lay
everything out again.

Simplify expando menu bar background drawing. The only part of this
drawing code that was actually being shown was the part where it stroked a
vertical line like this:

rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
SetHighColor(tint_color(menuColor, 1.22));
StrokeLine(bounds.LeftTop(), bounds.LeftBottom());

The rest of the code was never seen. May the following code also be forever
memorialized in this commit message:

void
TExpandoMenuBar::DrawBackground(BRect updateRect)
{
if (Vertical())
return;

BRect bounds(Bounds());
rgb_color menuColor = ui_color(B_MENU_BACKGROUND_COLOR);
rgb_color hilite = tint_color(menuColor, B_DARKEN_1_TINT);
rgb_color vlight = tint_color(menuColor, B_LIGHTEN_2_TINT);

int32 count = CountItems() - 1;
if (count >= 0)
bounds.left = ItemAt(count)->Frame().right + 1;
else
bounds.left = 0;

if (be_control_look != NULL) {
SetHighColor(tint_color(menuColor, 1.22));
StrokeLine(bounds.LeftTop(), bounds.LeftBottom());
bounds.left++;
uint32 borders = BControlLook::B_TOP_BORDER
| BControlLook::B_BOTTOM_BORDER | BControlLook::B_RIGHT_BORDER;

be_control_look->DrawButtonBackground(this, bounds, bounds, menuColor,
0, borders);
} else {
SetHighColor(vlight);
StrokeLine(bounds.LeftTop(), bounds.RightTop());
StrokeLine(BPoint(bounds.left, bounds.top + 1), bounds.LeftBottom());
SetHighColor(hilite);
StrokeLine(BPoint(bounds.left + 1, bounds.bottom),
bounds.RightBottom());
}
}

Change-Id: Id9ddd60c997a785184208ba02938bee1416aeae9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2253
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 419bc0a2 03-Nov-2018 Axel Dörfler <axeld@pinc-software.de>

Deskbar: Made the leaf scale with the font size

* It's now a vector icon as well.
* Vertical mode doesn't look that good anymore with higher font sizes,
but I didn't understand how to do it properly.

Change-Id: I0eed0e2873b270c349dfd3af117cfcb751e590a1
Reviewed-on: https://review.haiku-os.org/671
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# b1967b10 09-Jan-2017 John Scipione <jscipione@gmail.com>

Revert "Deskbar: Scale cut-off leaf icon in horizontal mode"

This reverts commit 066137eb05fc965261d6e50f24e41b9dcf79a5a7.

Reverting while I figure out what is causing Deskbar to crash.


# da628685 09-Jan-2017 John Scipione <jscipione@gmail.com>

Revert "Deskbar: Inital FetchIcon() in AttachedToWindow()"

This reverts commit 52e243a7d1c952fa3dff316cadf0b9fdde5f4c4c.


# cce67d76 09-Jan-2017 John Scipione <jscipione@gmail.com>

Revert "Deskbar: Call parent AttachedToWindow() first"

This reverts commit bea76b8aa16061ddaa48ac90ac0a48663138ef2c.


# bea76b8a 08-Jan-2017 John Scipione <jscipione@gmail.com>

Deskbar: Call parent AttachedToWindow() first

must have connection to App Server before FetchIcon()

Hopefully fixes #13172


# 52e243a7 08-Jan-2017 John Scipione <jscipione@gmail.com>

Deskbar: Inital FetchIcon() in AttachedToWindow()

This ensures that we have a connection to App Server at the
time we are fetching the icon.

Hopefully fixes #13172


# 066137eb 07-Jan-2017 John Scipione <jscipione@gmail.com>

Deskbar: Scale cut-off leaf icon in horizontal mode

Fixes #8505 restoring the aesthetic integrity of the cut-off leaf.

Add vertically & horizontally centered, whole vector icon to rdef.

Reformat BarMenuTitle.h rename header guard from BARMENUTITLEH to
BAR_MENU_TITLE_H.

Created TDeskbarMenuTitle subclass which deals with Deskbar menu
item stuff like getting the icon from vector data and pushing the
leaf down a few pixels to cut off the leaf (maintaining its aesthetic
integrity).

Made TBarMenuTitle methods virtual. Remove unused expando constructor
parameter and private variable.

Add a TODO to scale the bitmap if we can't find any vector icon data.
With non-vector bitmap it behaves same as before this commit in
horizontal mode.

Adjust kMinimumTrayWidth to restore Deskbar's minimum width to its
classic value since days of yore, 143px. This, perhaps not coincidently,
is exactly the amount fit 7 replicant icons. Update constants in the
code to reflect this reality. Adjustable width coming soon.

replace dynamic_cast<TBarApp*>(be_app) with a static_cast in 1 place.


# 16c10517 09-Dec-2015 looncraz <looncraz@looncraz.net>

Deskbar: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0076 from looncraz, unmodified.


# 4ae3e542 14-Apr-2013 John Scipione <jscipione@gmail.com>

Fix a bug where the Deskbar menu was incorrectly sized in horizontal mode

Actually, the Deskbar menu was sized correctly but the separator item was not,
so, I've replaced the separator item with a new TSeparatorItem class that is derived
from BSeparatorItem but does it's own drawing. This neatly avoids the bug since
the TSeperatorItem doesn't need to be resized explicitly.

Also, there were some instances of AddSeperatorItem (with an e) that I renamed to
AddSeparatorItem (with an a). I also eliminated includes in the header which means
I added them in some cpp files where they were needed.


# 03f7c11e 14-Apr-2013 John Scipione <jscipione@gmail.com>

Rename SetWidthHeight to SetContentSize


# bec79905 14-Apr-2013 John Scipione <jscipione@gmail.com>

Remove yet another unneeded include


# fe624b39 13-Apr-2013 John Scipione <jscipione@gmail.com>

Style fixes only

Most indentation and newlines with a few comment updates


# 6c54ebe5 15-Nov-2012 John Scipione <jscipione@gmail.com>

Set fSeparatorItem NULL initially fixing #9151 on gcc4


# 08282eb4 14-Nov-2012 John Scipione <jscipione@gmail.com>

Remove cast to BMenuItem* it is not needed


# fc18a4f5 14-Nov-2012 John Scipione <jscipione@gmail.com>

Alter Add and Remove methods to return whether or not the add or remove succeeded.


# 11f46c6d 14-Nov-2012 John Scipione <jscipione@gmail.com>

Assume AddItem and RemoveItem could fail and handle those cases.

This is some defensive coding that assumes that the AddTeamMenu(),
RemoveTeamMenu(), AddSeperatorItem(), and RemoveSeperatorItem()
methods might fail and tries to compensate. Although it is unlikely
to be the case that these methods could fail I am trying to prevent
the bug that caused #9151 to happen.


# cb7c5f05 14-Nov-2012 John Scipione <jscipione@gmail.com>

Use a static_cast when removing menu item from BarMenuBar

... instead of a C-style cast. Also some minor style fixes.

Might fix #9151 although since I can't reproduce the bug here I have
no way of knowing.


# 0f10682f 13-Nov-2012 John Scipione <jscipione@gmail.com>

Small style fix


# d6f6b835 26-Oct-2012 John Scipione <jscipione@gmail.com>

Draw a nice menu background on the inline scroll view and when scroll faster when you push control/option/command and click the little arrow button.


# c07e6ff2 26-Oct-2012 John Scipione <jscipione@gmail.com>

Make horizontal scrolling work in Deskbar

* Split the Leaf menu and seperator into their own menubar.
* I got rid of a lot of special cases for horizontal in the
ExpandoMenuBar class because now the menubar contains the same
items as in vertical mode. However, it also means that the dreaded
<none> bug also affects horizontal mode.
* Make the application menubar resize itself even in horizontal mode.
This means that the view background shows through so I'm going to have
to fix this up.
* Calculate when to add the scroll arrows and how much to allow the user
to scroll by for horizontal. CheckItemSizes() got a big refactoring.
* Rework the InlineScrollView class a bit. It no longer requires you to
specify the begin and end limits on construction because it can
calculate them instead. It also no longer depends on the screen at all,
this means this class can be extened to be used more generally and in
more places.


# 615d572d 03-May-2012 John Scipione <jscipione@gmail.com>

Fix #8505 cut-off Deskbar leaf bug.

Replace the leaf bitmap with a non-cutoff version derived from the
'data/artwork/Haiku Leaf' file. So, when icon size is > 16 the full
deskbar leaf is shown without the bottom cut-off. It should look
pretty much identical at 16x16 and in vertical mode at any icon size.

Also add a deskbar_leaf.png file to the data/artwork directory
although I didn't use that file in Deskbar, instead I embed an
archive bitmap into icons.h. I got rid of icon-freelogo.rdef and
icons_logo.h.


# 1cd61330 02-May-2012 John Scipione <jscipione@gmail.com>

Style fixes including reordering #include's in Deskbar

* Reorder includes according to the Style Guide.
* Whitespace changes, mostly making sure there are 2 newlines
between things and making sure there is 1 newline at the end of
each file.
* Make end of header files all in the style of
#endif\t/* _HEADER_GAURD_H_ */
* The one change that is not purely style is to #include <Path.h>
in DeskbarUtils.h instead of DeskbarUtils.cpp because it is used
to define entry_ref for the AddRefsToDeskbarMenu() prototype.


# 323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# 9e8a970b 24-Mar-2011 Jonas Sundström <jonas@kirilla.com>

A better for the leaf logo bitmap.

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


# 4ec67d2b 05-Mar-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Patches from John Scipione as part of bug 7052.


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


# 71bd3ba5 30-Sep-2009 Jonas Sundström <jonas@kirilla.com>

Removing ifdefs and code for non-Haiku build targets. Partial clean-up. Enforcing the 80-char limit, renaming constants, newline at end of file.

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


# 290c9039 29-Sep-2009 Jonas Sundström <jonas@kirilla.com>

Partial clean-up. Asterisks and k-prefix constants.

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


# 1cf94bf9 18-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Cleaned up the include list. It's probably safest to include <Debug.h> before
anything else.


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


# 7da06231 01-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Imported Deskbar from OpenTracker-current.


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


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

Added Tracker and Deskbar from OpenTracker-current to the repository.
They both build fine.


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


# 4ae3e5421d4009205c273ec076bdcb5e1f21f936 14-Apr-2013 John Scipione <jscipione@gmail.com>

Fix a bug where the Deskbar menu was incorrectly sized in horizontal mode

Actually, the Deskbar menu was sized correctly but the separator item was not,
so, I've replaced the separator item with a new TSeparatorItem class that is derived
from BSeparatorItem but does it's own drawing. This neatly avoids the bug since
the TSeperatorItem doesn't need to be resized explicitly.

Also, there were some instances of AddSeperatorItem (with an e) that I renamed to
AddSeparatorItem (with an a). I also eliminated includes in the header which means
I added them in some cpp files where they were needed.


# 03f7c11ece0869967f2dc6b36cca8da7403594af 14-Apr-2013 John Scipione <jscipione@gmail.com>

Rename SetWidthHeight to SetContentSize


# bec79905623d1b1954a3b2bcde7fc0a1e1928732 14-Apr-2013 John Scipione <jscipione@gmail.com>

Remove yet another unneeded include


# fe624b3937dc8b7a4551dbc66b5e5c81dfb468d6 13-Apr-2013 John Scipione <jscipione@gmail.com>

Style fixes only

Most indentation and newlines with a few comment updates


# 6c54ebe5d51733f614ee989c068b90fef4604273 15-Nov-2012 John Scipione <jscipione@gmail.com>

Set fSeparatorItem NULL initially fixing #9151 on gcc4


# 08282eb47616c72116fd4ad2ffc36ca4efddaf15 14-Nov-2012 John Scipione <jscipione@gmail.com>

Remove cast to BMenuItem* it is not needed


# fc18a4f5b35b39856c47185c64560f0605c6684c 14-Nov-2012 John Scipione <jscipione@gmail.com>

Alter Add and Remove methods to return whether or not the add or remove succeeded.


# 11f46c6d37ec5dbc502b72538cdf3ab0f1005629 14-Nov-2012 John Scipione <jscipione@gmail.com>

Assume AddItem and RemoveItem could fail and handle those cases.

This is some defensive coding that assumes that the AddTeamMenu(),
RemoveTeamMenu(), AddSeperatorItem(), and RemoveSeperatorItem()
methods might fail and tries to compensate. Although it is unlikely
to be the case that these methods could fail I am trying to prevent
the bug that caused #9151 to happen.


# cb7c5f05bb564cf484b0ba38d3f200406c59640f 14-Nov-2012 John Scipione <jscipione@gmail.com>

Use a static_cast when removing menu item from BarMenuBar

... instead of a C-style cast. Also some minor style fixes.

Might fix #9151 although since I can't reproduce the bug here I have
no way of knowing.


# 0f10682f8bf962a5e7d30a22d9fd5da7bf632409 13-Nov-2012 John Scipione <jscipione@gmail.com>

Small style fix


# d6f6b835adcb34abfca03207f272614373f38bb1 26-Oct-2012 John Scipione <jscipione@gmail.com>

Draw a nice menu background on the inline scroll view and when scroll faster when you push control/option/command and click the little arrow button.


# c07e6ff292cbe19ab758ce8bcb6c5cde38a3e662 26-Oct-2012 John Scipione <jscipione@gmail.com>

Make horizontal scrolling work in Deskbar

* Split the Leaf menu and seperator into their own menubar.
* I got rid of a lot of special cases for horizontal in the
ExpandoMenuBar class because now the menubar contains the same
items as in vertical mode. However, it also means that the dreaded
<none> bug also affects horizontal mode.
* Make the application menubar resize itself even in horizontal mode.
This means that the view background shows through so I'm going to have
to fix this up.
* Calculate when to add the scroll arrows and how much to allow the user
to scroll by for horizontal. CheckItemSizes() got a big refactoring.
* Rework the InlineScrollView class a bit. It no longer requires you to
specify the begin and end limits on construction because it can
calculate them instead. It also no longer depends on the screen at all,
this means this class can be extened to be used more generally and in
more places.


# 615d572db00c03d9de04a6d3ed0f3c50929e0635 03-May-2012 John Scipione <jscipione@gmail.com>

Fix #8505 cut-off Deskbar leaf bug.

Replace the leaf bitmap with a non-cutoff version derived from the
'data/artwork/Haiku Leaf' file. So, when icon size is > 16 the full
deskbar leaf is shown without the bottom cut-off. It should look
pretty much identical at 16x16 and in vertical mode at any icon size.

Also add a deskbar_leaf.png file to the data/artwork directory
although I didn't use that file in Deskbar, instead I embed an
archive bitmap into icons.h. I got rid of icon-freelogo.rdef and
icons_logo.h.


# 1cd61330ecd8257551d58f204332d00145c855ec 02-May-2012 John Scipione <jscipione@gmail.com>

Style fixes including reordering #include's in Deskbar

* Reorder includes according to the Style Guide.
* Whitespace changes, mostly making sure there are 2 newlines
between things and making sure there is 1 newline at the end of
each file.
* Make end of header files all in the style of
#endif\t/* _HEADER_GAURD_H_ */
* The one change that is not purely style is to #include <Path.h>
in DeskbarUtils.h instead of DeskbarUtils.cpp because it is used
to define entry_ref for the AddRefsToDeskbarMenu() prototype.


# 323b65468e5836bb27a5e373b14027d902349437 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 3dfd9cb95ce45f59160d50975210bc55e3fc0709 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# 9e8a970bd56e3888b93167d1ab60deef85b7a899 24-Mar-2011 Jonas Sundström <jonas@kirilla.com>

A better for the leaf logo bitmap.

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


# 4ec67d2b37f3100924230787b6ca2170ad31b586 05-Mar-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Patches from John Scipione as part of bug 7052.


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


# 71bd3ba59c06b130115c3ddd44457d8f9dd78997 30-Sep-2009 Jonas Sundström <jonas@kirilla.com>

Removing ifdefs and code for non-Haiku build targets. Partial clean-up. Enforcing the 80-char limit, renaming constants, newline at end of file.

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


# 290c903985a449fa86c501366b6fcddf7f55b46a 29-Sep-2009 Jonas Sundström <jonas@kirilla.com>

Partial clean-up. Asterisks and k-prefix constants.

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


# 1cf94bf91f3b7d038b366ef9f270d09a73a0ad6e 18-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Cleaned up the include list. It's probably safest to include <Debug.h> before
anything else.


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


# 7da062312a13b77ed1aac63bdd67c44c44ad5824 01-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Imported Deskbar from OpenTracker-current.


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


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

Added Tracker and Deskbar from OpenTracker-current to the repository.
They both build fine.


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