History log of /haiku/src/apps/deskbar/TeamMenuItem.cpp
Revision Date Author Comments
# ac121994 13-Oct-2023 John Scipione <jscipione@gmail.com>

Deskbar: Set sub-menus to menu font

Top level "menu" still uses be_plain_font, submenus use menu font.
Window submenus use menu font, but in super-expando mode they use
the plain font since they are on top level.

Change-Id: I704e9baa1ec46d1cbf7b9401ba4e49b5e2dff27c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7041
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 396f398d 04-May-2023 John Scipione <jscipione@gmail.com>

Deskbar: Fix horizontal mode window size limits

When your font size and team icon size is large
enough horizontal mode Deskbar gets cut off.

Compare composed to composed, this restores the icon
size scaling behavior as indended before compose
changes in Deskbar: label is positioned to the right
of the team icon until after the third icon size
notch regardless of your font size.

Change-Id: Ia1d1418cc3b04536a55860d3889d2437c40986cc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6415
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 9da3977c 05-May-2023 John Scipione <jscipione@gmail.com>

Deskbar: Rename IconSize() to TeamIconSize()

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


# 4f97a431 07-Apr-2023 John Scipione <jscipione@gmail.com>

Deskbar: Make Vulcan Death Grip work in mini-mode

Refactor so that ExpandoMenuBar and TeamMenu both call the menu item
TeamMenuItem::HandleMouseDown() method to do the actual work and then
send a message to cleanup.

Fixes #17761

Change-Id: I0e13e5fc6c90236936120ff0dda1246123576d37
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6311
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 9f4bb0f5 26-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

Deskbar: Compute more metrics instead of hardcoding them.


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

Deskbar: Use BControlLook::ComposeIconSize() and other metrics routines.

This gets Deskbar looking somewhat more like its usual self in HiDPI
environments. There are still some hardcoded sizes which need to be
refactored, however.


# 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>


# 15eb397e 19-Jul-2018 John Scipione <jscipione@gmail.com>

Deskbar: Adjust team menu items with font size.

The Deskbar team menu should look the same at 12pt but much better
at larger (and smaller) font sizes.

Determine team menu item height in TBarView instead of
TTeamMenuItem::GetContentSize() because it is needed earlier in the
process, and also call method in GetContentSize().

The clock is centered horizontally in the first replicant row and the
width can grow to push the replicant icons better at larger font sizes.

The replicant tray and clock go to the bottom in horizontal bottom mode
and go to the top in horizontal top mode for Fitt's Law convinience and
go in the center of the first row in vertical mode.

Grow horizontal team item widths with font size, and shrink them
down to 1/2 of full width to fit more, or 1/2 padding for icon-only.

In horizontal mode the menu item size increases so that you can fit
approximate the same amount of label text based on icon and font size.
hit the width limit the items shrink and the label gets truncated
(like before.)

Scale team menu with font size. Reduce to half width for hide labels.

Change-Id: I93ecc8acded274b994728e7247768455862e31c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/345
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 6a27de89 26-Jan-2020 Murai Takashi <tmurai01@gmail.com>

deskbar Fix PVS V595

Add NULL check for 'fBarView', since it might be NULL
at line 107.

Change-Id: I293e551dd4ab6ac33b7d4a6d1bf736bcd142cb80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2170
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 9a9f4ef5 07-Sep-2019 Mikael Konradsson <mikael.konradsson@outlook.com>

Deskbar: Made expander knobs light when menu background is dark

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


# 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.


# c38afcd6 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Remove Name() and fName, replace with Label()

... from TeamMenuItem and WindowMenuItem.

It was confusing having Name(), Label(), and TruncatedLabel().

Name() == Label() because Label() never changes, the displayed
Label stored in TruncatedLabel() in both TeamWindowItem and
WindowMenuItem (remember they both inherit from
TruncatableMenuItem so they get that for free). So Name() was
redundant, by getting rid of it there is just Label() and TruncatedLabel()
which is all we need!


# e9982f68 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Rename _InitData() to just _Init()

in TeamMenuItem. For consistency.


# 6b65d934 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: some more style fixes, reorg methods


# 072c2dcd 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Add some pragma statements


# c9363f78 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Truncate menu item labels refactor

* Create a new TTruncatableMenuItem class to store the truncated string
and share the label truncation code between TTeamMenuItem and
TWindowMenuItem. In the future more shared code may be added to
this class, if so, the class name may change.
* The TTeamMenuItem and TWindowMenuItem classes inherit from
TTruncatableMenuItem, which inherits from BMenuItem.
* Make sure to truncate the label before drawing it in all cases.
* Some other related refactoring.

Fixes #9507


# 25295e68 13-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Set the tool tip for truncated label


# 5e625ead 12-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Label truncation code refactor & cleanup

* Increase kVPad to 2.0f in ExpandoMenuBar matching the
constant in WindowMenuItem
* Also replace a hardcoded instance of 4.0f with kVPad * 2
* Remove TTeamMenuItem::DrawContentLabel(), move code to DrawContent()
* Cleanup label truncation code in TTeamMenuItem, still needs work.
* Rename WindowMenuItem::FullTitle() to Name() matching TeamMenuItem
* Move the code to set all label related variables in SetLabel() in
TeamMenuItem
* Change WindowMenuItem::SetRequireUpdate() to take a bool parameter
* Make WindowMenuItem::Initialize() private and rename it to _Init()
* Rename WindowMenuItem::ExpandedItem() to SetExpanded()
* Truncate WindowMenuItem label like we are doing TeamMenuItem
* Rename all WindowMenuItem::Title* methods and variables to Label*


# deaae5fc 07-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Persist ExpandoMenuBar

Add private BMenu::_SetMenuLayout() method. Set TExpandoMenuBar
as a friend class in BMenu to call this method. A little hacky,
but, this keeps SetMenuLayout() from being exposed as part of
the public API.

Don't destroy and rebuild the ExpandoMenuBar when switching from
horizontal to vertical mode. Instead build the TExpandoMenuBar
when the application starts and then switch it from B_ITEMS_IN_ROW
to B_ITEMS_IN_COLUMNS by using the newly added _SetMenuLayout()
method.

When we resize from vertical to horizontal, recalc the max
menu item widths, this resizes the application menu items so
that they take up the right amount of space.

Since we no longer destroy the menu bar we no longer have to
save whether menu items are expanded or not in a separate list.
Instead we can store that information in directly in
TExpandoMenuBar. This removes a lot of code.

Fixes #9350


# c9d2a320 06-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: TTeamMenuItem changes

* Add Icon() and SetIcon() methods.
* Remove HasLabel() and SetHasLabel() methods, ExpandoMenuBar now gets
this information from the settings file directly, rather than storing
and syncing this information with the TTeamMenuItem class.
* Move SetOverrideWidth(), SetOverrideHeight(), and
SetArrowDirection() implementations to header.


# 18bcf77a 06-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Don’t save fHasLabel and fVertical

in the TTeamMenuItem, get it from the parent or settings instead.


# a7c02e02 12-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: style fixes to TeamMenuItem


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

Style fixes to TeamMenu


# 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.


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

Style fixes only

Most indentation and newlines with a few comment updates


# 2b8d4131 07-Apr-2013 John Scipione <jscipione@gmail.com>

Remove dead code


# 1dccb7aa 07-Apr-2013 John Scipione <jscipione@gmail.com>

Don't call DrawExpanderArrow() directly, set a variable and Invalidate()


# 5b0fd10d 07-Apr-2013 John Scipione <jscipione@gmail.com>

Animate the expander arrow

On MouseDown draw a diagonal arrow, on MouseUp complete the animation and
expand. If you hold down the button it will stay diagonal until you MouseUp
and either return to normal or animate and expand if over the arrow.

Reformatted ExpandoMenuBar.h and TeamMenuItem.h
Renamed fLastClickItem to fLastClickedItem
Added a DrawExpanderArrow() method
Renamed private InitData() method to _InitData() and moved it to the bottom


# de49a051 06-Apr-2013 John Scipione <jscipione@gmail.com>

Update expander arrows to point right or down (if expanded)

... like BeOS R5. I looked in the commmit logs for this one and there wasn't really any
explination for why this got changed, so, I'm changing it back to the way it was in R5 which
is right arrow for unexpanded, down arrow for expanded. Please yell at me if this change
was intentional.


# 859c3781 11-Feb-2013 John Scipione <jscipione@gmail.com>

Update Deskbar to use menu text and selected menu text color prefs.

... in a couple of places where colors where being hardcoded.

Fixes #9119


# 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.


# afa1c291 21-Jul-2012 John Scipione <jscipione@gmail.com>

Tweaks, remove dead code. Menu and Menubar are stock again.


# 49ff476d 19-Jul-2012 John Scipione <jscipione@gmail.com>

Make ScrollMenu not rely on Menu.cpp

Rename ScrollMenu.cpp to MenuScrollView.cpp

Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.


# cb55ef9f 27-Jun-2011 John Scipione <jscipione@gmail.com>

WIP: Created a BScrollMenu class that works like BMenuWindow but works on a view instead of a window. Use this to implement a scrollable BarMenuBar in Deskbar. The basics work but there are issues still with sizing and other issues.

Modify the ScrollMenu class to use the layout kit by adding a constructor that doesn't take a view.

Get the BScrollMenu class to follow the size of the BMenu it is a parent of. Adjust the scrollers to appear in the right places. This is a WIP but it works in Deskbar, next step is to integrate this directly into BMenu with the scrollers as children of the menu instead of as children of the BScroller class.

Rebase changes on top of master

Deskbar scrolling works for the most part, just need to fix the
bottom arrow and clean up a bit.


# e9632898 09-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Added Tracker and Deskbar to x86_64 build.


# e19488b2 02-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Make Deskbar respect the menu text color settings.

Hard-coding black is bad, mmmkay?

This makes Deskbar usable on dark background with light text color schemes.


# ab4e79c3 02-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Fix Deskbar based on my recent menu change.

Thanks augiedoggie for pointing it out.


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

Refactor Tooltip's in Deskbar.

Only update the tooltip if the mouse goes over a new menu item making
sure to exit if the item is NULL, there is a visible label, or it is the
same item. If the mouse moves outside the view reset the last item to
NULL.

* Rename DrawLabel() and SetDrawLabel() to HasLabel() and SetHasLabel()
to make it clear what these methods are setting a getting and setting
a bool and not doing the actual work for drawing the label.


# 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.


# 1f0c9f18 23-Apr-2012 John Scipione <jscipione@gmail.com>

Set a tooltip with the application name if hidden.

If Deskbar is set to hide application names show the application
name as a tooltip when you hover your mouse over the item.

* Style fixes.
* Save CountItems() into a variable outside the loop so that it only
gets called once (micro-optimization/best-practice).
* Convert a for loop to a while loop that wasn't really being used
used as a for loop anyway, the variables are declared and used
outside the loop.


# d0a49328 07-Apr-2012 John Scipione <jscipione@gmail.com>

Fix a few more bugs in Deskbar, find a new one too.

Hiding in horizontal mode was leaving behind a white bar because the
window was getting hidden but the view not resized. Now fixed.

Moved simple state and member access function implementations from
BarView.cpp to BarView.h. Always use the local variable in BarView.cpp
to avoid a function call.

Rename Expando() to ExpandoState() and add FullState() and MiniState()
methods to BarView.h.

Call just PlaceApplicationBar() in vertical expando mode when resizing
icons. Call the full UpdatePlacement() in horizontal mode because I need
to update the height of the status tray when icons resize. Do not call
any method in MiniState because the icons will get resized when the
menu gets opened later.

The new bug I found is a little subtle. If you hide the clock by right
clicking on the clock and selecting Hide clock then quit deskbar with
'hey Deskbar QUIT' and restart Deskbar with 'Deskbar' the Show seconds
checkbox in the preference is disabled correctly, however, right clicking
Show Clock doesn't undisable the checkbox so you can no longer hide
seconds anymore. I'll fix this in a bit.


# 2ce9bab8 27-Jun-2011 John Scipione <jscipione@gmail.com>

Fisher Price Deskbar icon support

Implements the feature described in #7132
Also fixes #2387 (menu items too big in horizontal mode when font size > 12)

Adds a slider to Deskbar preferences which allows you to resize your Deskbar
team icons from 16x16 to 96x96. The default is 16x16. This works both in vertical
and horizontal mode.

In vertical mode when icon sizes are greater than 32x32 the label moves
underneath the icon where there is more room. In horizontal mode the width of
the menu item increases to make room for the icon while keeping room for the
label the same. As many applications are added the labels are truncated as usual.

This patch also adds a checkbox to the Deskbar preferences to hide application
names to make more room for icons if you wish. It doesn't make a lot of sense
at 16x16 but does >32x32.

If the kResizeTeamIcons message gets dropped, don't resize to current value,
just do nothing. This fixes a bug where sometimes the slider wouldn't trigger
a resize. Fix a spelling error in a comment. Take out a redundant paren pair.


# 1687edd0 06-Mar-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Final set of style cleanup patches by John Scipione as part of #7052.


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


# c0107fb2 24-Feb-2011 Jonas Sundström <jonas@kirilla.com>

CID 4147, NO_EFFECT

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


# eddec292 21-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 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


# cb6afcb1 21-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

* Give Deskbar a refreshed and cleaner look.
* Fixed a bunch of problems in layouting the various views. (For example,
the last app menu entry is no longer one pixel too short, but there was
more...)
* Fixed Deskbar being not wide enough for the Haiku logo in certain modes.
* Enabled the mount menu. I think it's a good idea to have at a more prominent
location where new Haiku users may look for it (Gnome also has this in
the main panel).


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


# 249a4a18 13-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

zooey + stippi:
Reimplemented the drag message over the team entries dragging. The previous
implementation used the menu bar tracking by faking a B_MOUSE_DOWN event. The
problem was that in Haiku menus are always sticky and therefor the tracking
thread was not exited when the user released the mouse (which was supposed to
trigger the drop event in the Deskbar). The new implementation follows the
drag in the asynchronous mouse hooks and uses it's own selection state in
TTeamMenuItem to highlight the eventual drop targets.
Fixes #2771.


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


# eaa9af99 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Never use the current menu UI color, but always the view color of any given
menu. Fixes #974.


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


# 136d40a8 18-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

in case the passed name was NULL, the TeamMenuItem would set a NULL label, instead of passing the 'team n' string. Also use snprintf() to build said string, and change the code a bit. malloc.h > stdlib.h, and don't check for null before calling free()

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


# bdfed6c0 11-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

While I couldn't reproduce bug #657 myself, this should fix it.
TTeamMenuItem::AttachedToWindow() calls BView::SetFont() which entered the debugger
if the menu was visible at the time.


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


# 59deaf10 11-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

various changes to improve integration of vector icons
* Deskbar uses 32 bit icons now
* vector icons are now correctly converted to B_CMAP8 bitmaps
if no B_CMAP8 icon is available
* small fixes in Tracker (window mode menu)


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


# 1407220d 06-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

use B_OP_OVER to draw the arrow, due to anti-aliasing

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16605 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


# c38afcd62ca869cd169ed52fa171db35352bbd00 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Remove Name() and fName, replace with Label()

... from TeamMenuItem and WindowMenuItem.

It was confusing having Name(), Label(), and TruncatedLabel().

Name() == Label() because Label() never changes, the displayed
Label stored in TruncatedLabel() in both TeamWindowItem and
WindowMenuItem (remember they both inherit from
TruncatableMenuItem so they get that for free). So Name() was
redundant, by getting rid of it there is just Label() and TruncatedLabel()
which is all we need!


# e9982f68286dd6935fed4c9f3e8f5d01c91d7cff 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Rename _InitData() to just _Init()

in TeamMenuItem. For consistency.


# 6b65d934dfcf372c2c527a6cc4c2d3536754834f 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: some more style fixes, reorg methods


# 072c2dcde2955c2503b240cf7561da38ad50f536 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Add some pragma statements


# c9363f78d67001545182ce032918648ccb3d6e16 19-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Truncate menu item labels refactor

* Create a new TTruncatableMenuItem class to store the truncated string
and share the label truncation code between TTeamMenuItem and
TWindowMenuItem. In the future more shared code may be added to
this class, if so, the class name may change.
* The TTeamMenuItem and TWindowMenuItem classes inherit from
TTruncatableMenuItem, which inherits from BMenuItem.
* Make sure to truncate the label before drawing it in all cases.
* Some other related refactoring.

Fixes #9507


# 25295e68997bd8bd5717520317cb212942faab40 13-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Set the tool tip for truncated label


# 5e625ead65c3e04f9246a0b47ba24cea15e75428 12-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Label truncation code refactor & cleanup

* Increase kVPad to 2.0f in ExpandoMenuBar matching the
constant in WindowMenuItem
* Also replace a hardcoded instance of 4.0f with kVPad * 2
* Remove TTeamMenuItem::DrawContentLabel(), move code to DrawContent()
* Cleanup label truncation code in TTeamMenuItem, still needs work.
* Rename WindowMenuItem::FullTitle() to Name() matching TeamMenuItem
* Move the code to set all label related variables in SetLabel() in
TeamMenuItem
* Change WindowMenuItem::SetRequireUpdate() to take a bool parameter
* Make WindowMenuItem::Initialize() private and rename it to _Init()
* Rename WindowMenuItem::ExpandedItem() to SetExpanded()
* Truncate WindowMenuItem label like we are doing TeamMenuItem
* Rename all WindowMenuItem::Title* methods and variables to Label*


# deaae5fc20b5cf44115441d34a1e33436df885b2 07-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Persist ExpandoMenuBar

Add private BMenu::_SetMenuLayout() method. Set TExpandoMenuBar
as a friend class in BMenu to call this method. A little hacky,
but, this keeps SetMenuLayout() from being exposed as part of
the public API.

Don't destroy and rebuild the ExpandoMenuBar when switching from
horizontal to vertical mode. Instead build the TExpandoMenuBar
when the application starts and then switch it from B_ITEMS_IN_ROW
to B_ITEMS_IN_COLUMNS by using the newly added _SetMenuLayout()
method.

When we resize from vertical to horizontal, recalc the max
menu item widths, this resizes the application menu items so
that they take up the right amount of space.

Since we no longer destroy the menu bar we no longer have to
save whether menu items are expanded or not in a separate list.
Instead we can store that information in directly in
TExpandoMenuBar. This removes a lot of code.

Fixes #9350


# c9d2a320a332f0a218d9da0a60f1782b63f97585 06-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: TTeamMenuItem changes

* Add Icon() and SetIcon() methods.
* Remove HasLabel() and SetHasLabel() methods, ExpandoMenuBar now gets
this information from the settings file directly, rather than storing
and syncing this information with the TTeamMenuItem class.
* Move SetOverrideWidth(), SetOverrideHeight(), and
SetArrowDirection() implementations to header.


# 18bcf77ab08a66f3820fa608a124b199742a0070 06-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Don’t save fHasLabel and fVertical

in the TTeamMenuItem, get it from the parent or settings instead.


# a7c02e02e95d1da230576abdc431c09d481c3e60 12-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: style fixes to TeamMenuItem


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

Style fixes to TeamMenu


# 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.


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

Style fixes only

Most indentation and newlines with a few comment updates


# 2b8d4131162ef7f5648ab4feb4860ab61d66e084 07-Apr-2013 John Scipione <jscipione@gmail.com>

Remove dead code


# 1dccb7aaaf95547c40b23225da0d9bde9e8d9a49 07-Apr-2013 John Scipione <jscipione@gmail.com>

Don't call DrawExpanderArrow() directly, set a variable and Invalidate()


# 5b0fd10d23d2c57ab32c256784daafa2b97860fa 07-Apr-2013 John Scipione <jscipione@gmail.com>

Animate the expander arrow

On MouseDown draw a diagonal arrow, on MouseUp complete the animation and
expand. If you hold down the button it will stay diagonal until you MouseUp
and either return to normal or animate and expand if over the arrow.

Reformatted ExpandoMenuBar.h and TeamMenuItem.h
Renamed fLastClickItem to fLastClickedItem
Added a DrawExpanderArrow() method
Renamed private InitData() method to _InitData() and moved it to the bottom


# de49a051ea3f25e37350fc1add88ab5a00eb2d53 06-Apr-2013 John Scipione <jscipione@gmail.com>

Update expander arrows to point right or down (if expanded)

... like BeOS R5. I looked in the commmit logs for this one and there wasn't really any
explination for why this got changed, so, I'm changing it back to the way it was in R5 which
is right arrow for unexpanded, down arrow for expanded. Please yell at me if this change
was intentional.


# 859c378175de9013dda77d57199efc4c962215e0 11-Feb-2013 John Scipione <jscipione@gmail.com>

Update Deskbar to use menu text and selected menu text color prefs.

... in a couple of places where colors where being hardcoded.

Fixes #9119


# 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.


# afa1c29104c7f6b7a904008fbfc6a4835de4b3d3 21-Jul-2012 John Scipione <jscipione@gmail.com>

Tweaks, remove dead code. Menu and Menubar are stock again.


# 49ff476d139dc28ebaa95d65b7820423b6061d60 19-Jul-2012 John Scipione <jscipione@gmail.com>

Make ScrollMenu not rely on Menu.cpp

Rename ScrollMenu.cpp to MenuScrollView.cpp

Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.


# cb55ef9fb597a3f3bc91e53017360b18b20dd27b 27-Jun-2011 John Scipione <jscipione@gmail.com>

WIP: Created a BScrollMenu class that works like BMenuWindow but works on a view instead of a window. Use this to implement a scrollable BarMenuBar in Deskbar. The basics work but there are issues still with sizing and other issues.

Modify the ScrollMenu class to use the layout kit by adding a constructor that doesn't take a view.

Get the BScrollMenu class to follow the size of the BMenu it is a parent of. Adjust the scrollers to appear in the right places. This is a WIP but it works in Deskbar, next step is to integrate this directly into BMenu with the scrollers as children of the menu instead of as children of the BScroller class.

Rebase changes on top of master

Deskbar scrolling works for the most part, just need to fix the
bottom arrow and clean up a bit.


# e963289800007e623f4a120b27e7bd476230f57f 09-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Added Tracker and Deskbar to x86_64 build.


# e19488b2ccb0bfaf518e2c77180905996111a628 02-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Make Deskbar respect the menu text color settings.

Hard-coding black is bad, mmmkay?

This makes Deskbar usable on dark background with light text color schemes.


# ab4e79c3510f97e58a988622041c5c7ecceb82e5 02-Aug-2012 Ryan Leavengood <leavengood@gmail.com>

Fix Deskbar based on my recent menu change.

Thanks augiedoggie for pointing it out.


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

Refactor Tooltip's in Deskbar.

Only update the tooltip if the mouse goes over a new menu item making
sure to exit if the item is NULL, there is a visible label, or it is the
same item. If the mouse moves outside the view reset the last item to
NULL.

* Rename DrawLabel() and SetDrawLabel() to HasLabel() and SetHasLabel()
to make it clear what these methods are setting a getting and setting
a bool and not doing the actual work for drawing the label.


# 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.


# 1f0c9f183e3bd12f6056ca2251438ffada696d58 23-Apr-2012 John Scipione <jscipione@gmail.com>

Set a tooltip with the application name if hidden.

If Deskbar is set to hide application names show the application
name as a tooltip when you hover your mouse over the item.

* Style fixes.
* Save CountItems() into a variable outside the loop so that it only
gets called once (micro-optimization/best-practice).
* Convert a for loop to a while loop that wasn't really being used
used as a for loop anyway, the variables are declared and used
outside the loop.


# d0a49328634b3702d647e27b8704a3ce706074b8 07-Apr-2012 John Scipione <jscipione@gmail.com>

Fix a few more bugs in Deskbar, find a new one too.

Hiding in horizontal mode was leaving behind a white bar because the
window was getting hidden but the view not resized. Now fixed.

Moved simple state and member access function implementations from
BarView.cpp to BarView.h. Always use the local variable in BarView.cpp
to avoid a function call.

Rename Expando() to ExpandoState() and add FullState() and MiniState()
methods to BarView.h.

Call just PlaceApplicationBar() in vertical expando mode when resizing
icons. Call the full UpdatePlacement() in horizontal mode because I need
to update the height of the status tray when icons resize. Do not call
any method in MiniState because the icons will get resized when the
menu gets opened later.

The new bug I found is a little subtle. If you hide the clock by right
clicking on the clock and selecting Hide clock then quit deskbar with
'hey Deskbar QUIT' and restart Deskbar with 'Deskbar' the Show seconds
checkbox in the preference is disabled correctly, however, right clicking
Show Clock doesn't undisable the checkbox so you can no longer hide
seconds anymore. I'll fix this in a bit.


# 2ce9bab873e024bb515a95faf384df62b88bbb8c 27-Jun-2011 John Scipione <jscipione@gmail.com>

Fisher Price Deskbar icon support

Implements the feature described in #7132
Also fixes #2387 (menu items too big in horizontal mode when font size > 12)

Adds a slider to Deskbar preferences which allows you to resize your Deskbar
team icons from 16x16 to 96x96. The default is 16x16. This works both in vertical
and horizontal mode.

In vertical mode when icon sizes are greater than 32x32 the label moves
underneath the icon where there is more room. In horizontal mode the width of
the menu item increases to make room for the icon while keeping room for the
label the same. As many applications are added the labels are truncated as usual.

This patch also adds a checkbox to the Deskbar preferences to hide application
names to make more room for icons if you wish. It doesn't make a lot of sense
at 16x16 but does >32x32.

If the kResizeTeamIcons message gets dropped, don't resize to current value,
just do nothing. This fixes a bug where sometimes the slider wouldn't trigger
a resize. Fix a spelling error in a comment. Take out a redundant paren pair.


# 1687edd0fde594cd6f7c88f58a264c4787b4327d 06-Mar-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Final set of style cleanup patches by John Scipione as part of #7052.


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


# c0107fb2bf42f505ed7171a5c92fb6edacfb56a2 24-Feb-2011 Jonas Sundström <jonas@kirilla.com>

CID 4147, NO_EFFECT

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


# eddec292d5dd8251a00851880e16e6a5c07c1e3f 21-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 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


# cb6afcb1464e92f0134232e6179215295e17bc79 21-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

* Give Deskbar a refreshed and cleaner look.
* Fixed a bunch of problems in layouting the various views. (For example,
the last app menu entry is no longer one pixel too short, but there was
more...)
* Fixed Deskbar being not wide enough for the Haiku logo in certain modes.
* Enabled the mount menu. I think it's a good idea to have at a more prominent
location where new Haiku users may look for it (Gnome also has this in
the main panel).


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


# 249a4a187ee9e9e24aa41146e071ad1c01e27283 13-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

zooey + stippi:
Reimplemented the drag message over the team entries dragging. The previous
implementation used the menu bar tracking by faking a B_MOUSE_DOWN event. The
problem was that in Haiku menus are always sticky and therefor the tracking
thread was not exited when the user released the mouse (which was supposed to
trigger the drop event in the Deskbar). The new implementation follows the
drag in the asynchronous mouse hooks and uses it's own selection state in
TTeamMenuItem to highlight the eventual drop targets.
Fixes #2771.


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


# eaa9af9937ed538a6e175852bee9f22a2c20a814 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Never use the current menu UI color, but always the view color of any given
menu. Fixes #974.


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


# 136d40a89025d81ea1f429148cd04334ee75b067 18-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

in case the passed name was NULL, the TeamMenuItem would set a NULL label, instead of passing the 'team n' string. Also use snprintf() to build said string, and change the code a bit. malloc.h > stdlib.h, and don't check for null before calling free()

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


# bdfed6c06fe3c62c3265b4c748b3d9795520ad80 11-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

While I couldn't reproduce bug #657 myself, this should fix it.
TTeamMenuItem::AttachedToWindow() calls BView::SetFont() which entered the debugger
if the menu was visible at the time.


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


# 59deaf10bcbd8e27fd028f1757e62b27e09e385f 11-Sep-2006 Stephan Aßmus <superstippi@gmx.de>

various changes to improve integration of vector icons
* Deskbar uses 32 bit icons now
* vector icons are now correctly converted to B_CMAP8 bitmaps
if no B_CMAP8 icon is available
* small fixes in Tracker (window mode menu)


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


# 1407220dcf4f1a61f01f8c5cffc0d884861f935e 06-Mar-2006 Stefano Ceccherini <stefano.ceccherini@gmail.com>

use B_OP_OVER to draw the arrow, due to anti-aliasing

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16605 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