Skip to content

Commit

Permalink
twoddling
Browse files Browse the repository at this point in the history
  • Loading branch information
parg committed Dec 20, 2024
1 parent a035787 commit f4fc8cd
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
2 changes: 2 additions & 0 deletions uis/src/com/biglybt/ui/skin/skin3_constants.properties
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ color.sidebar.drag.bg=#d0deea
color.sidebar.drag.fg=#2688aa
color.sidebar.drag.bg._dark=COLOR_LIST_SELECTION
color.sidebar.hover.bg=#d0deea
color.sidebar.hover.bg._windows._dark=#404040
color.sidebar.hover.bg._unix=#D0D0D0
color.sidebar.hover.bg._unix._dark=#113F4E
color.sidebar.hover.bg._mac._dark=#113F4E

color.pieceview.alldone=BLUE.FADED.9
color.pieceview.notdone=#F0F0F0
Expand Down
19 changes: 19 additions & 0 deletions uis/src/com/biglybt/ui/swt/views/skin/sidebar/SideBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,25 @@ public void handleEvent(final Event event) {
return;
}
SideBarEntrySWT entry = (SideBarEntrySWT) treeItem.getData("MdiEntry");

if ( Constants.isOSX ){
// need this as moving right-click menu from one
// entry to another doesn't result in any mouse move events

if ( mousingOver != entry ){
SideBarEntrySWT old = mousingOver;

mousingOver = entry;
if ( old != null ){
old.redraw();
}
if ( entry != null ){

entry.redraw();
}
}
}

if (entry != null ) {
Point cursorLocation = tree.toControl(event.display.getCursorLocation());
if (lastCloseAreaClicked != null && lastCloseAreaClicked.contains(cursorLocation.x, cursorLocation.y)) {
Expand Down
14 changes: 10 additions & 4 deletions uis/src/com/biglybt/ui/swt/views/skin/sidebar/SideBarEntrySWT.java
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,10 @@ protected void swt_paintSideBar(Event event) {

if ( drawBounds.height > itemBounds.height ){

itemBounds.height = drawBounds.height;
// -1 needed on parg's old test setup for some reason otherwise drag-over
// causes cheesing

itemBounds.height = drawBounds.height-1;

drawBounds = itemBounds;
}
Expand Down Expand Up @@ -1144,7 +1147,7 @@ protected Color swt_paintEntryBG(int detail, GC gc, Rectangle drawBounds) {
boolean isDragging = sidebar.draggingOver == this;
boolean isHovering = sidebar.mousingOver == this;

boolean hot = isHovering || (detail & SWT.HOT) > 0;
boolean hot = isHovering;// || (detail & SWT.HOT) > 0;
if (selected) {
attention_start = -1;
}else{
Expand Down Expand Up @@ -1225,8 +1228,11 @@ protected Color swt_paintEntryBG(int detail, GC gc, Rectangle drawBounds) {

if ( Utils.isDarkAppearanceNativeWindows()){

c = Colors.getSystemColor( gc.getDevice(), isDragging?SWT.COLOR_WIDGET_NORMAL_SHADOW:SWT.COLOR_WIDGET_LIGHT_SHADOW );

if ( isDragging ){
c = Colors.getSystemColor( gc.getDevice(), SWT.COLOR_WIDGET_NORMAL_SHADOW );
}else{
c = skin.getSkinProperties().getColor("color.sidebar.hover.bg");
}
}else{
if ( isDragging ){
c = skin.getSkinProperties().getColor("color.sidebar.drag.bg");
Expand Down

0 comments on commit f4fc8cd

Please sign in to comment.