Feature to make Deskbar width variable via a dragger.
Resize Deskbar by clicking and dragging the mouse on the horizontal side of Deskbar opposite the screen's edge. (left side for default top right).
The resize dragger is hidden in horizontal mode.
- ExpandoMenuBar is resized with rest of window.
- Rename where to whereScreen to make it clear that the variable is in screen coordinates.
- Lock focus on window while resizing
- Resize via TResizeControl class which is based on TDragRegion
- Set default width to minimum so everything stays the same.
- don't set the width setting to 0 on quit, use the new setting.
- Set max tray width based on setting
- Make clock area a bit wider preventing replicant icons from overrunning the clock area.
- Leave more room left of clock makes replicants wrap earlier, leaving icon gap width between replicants and clock. Before it would butt flush against the clock before moving down a row.
- Remove FrameMoved from TDragRegion, we are already doing this in BarView -- no reason to do it twice.
- Need to redraw the drag region after moving or it will be half drawn.
- Hide resize control in horizontal mode
- Add room for resize dragger when placing replicants
- Update width setting unless window is hidden- This prevents Deskbar from being set to minimum width after it is hidden.
Also, constrain width setting within limits but not width of the BarView which we want to track the window width. In practice they should be the same but it is possible for them to get out of sync and that's okay. Obvious example of the setting and actual width of the window being out of sync is in the hidden case.
unify dragger width and kDragWidth vars
Make drag regions pixel perfect:
- Vertical mode status tray reduced in height by 1px to match height in horizontal mode exactly.
- move icons over by 2px in horizontal mode so that there is a bit more space on the left and so that it matches pixel perfect with vertical mode.- to see this quickly switch between bottom right vertical at the minimum width and horizontal mode then notice how the icons don't move
Draw drag background then menu color when not active to get rid of drawing glitches in horizontal mode on the top pixel.
Add some more room between last icon and clock in horizontal mode.
1bb2e62 Deskbar: variable width Deskbar in vertical mode
src/apps/deskbar/BarApp.cpp | 2 +-
src/apps/deskbar/BarView.cpp | 94 ++++++++++----
src/apps/deskbar/BarView.h | 2 +
src/apps/deskbar/BarWindow.cpp | 38 +++++-
src/apps/deskbar/BarWindow.h | 13 +-
src/apps/deskbar/ExpandoMenuBar.cpp | 10 +-
src/apps/deskbar/StatusView.cpp | 240 ++++++++++++++++++++++++++++--------
src/apps/deskbar/StatusView.h | 30 ++++-
8 files changed, 330 insertions(+), 99 deletions(-)