Skip to content

Commit

Permalink
Fix border colour in Win dark
Browse files Browse the repository at this point in the history
  • Loading branch information
parg committed Dec 23, 2024
1 parent 27c79d5 commit df46081
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions uis/src/com/biglybt/ui/swt/views/stats/TransferStatsView.java
Original file line number Diff line number Diff line change
Expand Up @@ -638,13 +638,31 @@ public void mouseUp(MouseEvent arg0) {

route_info_tab.setText( MessageText.getString( "label.routing" ));

Composite route_tab_comp = new Composite( con_folder, dark?SWT.BORDER:SWT.NULL );
route_tab_comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
Composite route_tab_comp1;
Composite route_tab_comp2;
gridData = new GridData(SWT.FILL, SWT.FILL, true, true);

if ( dark ){

// composite with border requires hack to colour correctly, otherwise white

Composite[] comps = Utils.createSkinnedCompositeEx( con_folder, SWT.BORDER, gridData );

route_tab_comp1 = comps[0];
route_tab_comp2 = comps[1];
}else{

route_tab_comp1 = new Composite( con_folder, SWT.NULL );
route_tab_comp1.setLayoutData(gridData);

route_tab_comp2 = route_tab_comp1;
}

GridLayout routeTabLayout = Utils.getSimpleGridLayout(1);
route_tab_comp.setLayout(routeTabLayout);
route_info_tab.setControl( route_tab_comp );
route_tab_comp2.setLayout(routeTabLayout);
route_info_tab.setControl( route_tab_comp1 );

ScrolledComposite sc = new ScrolledComposite( route_tab_comp, SWT.V_SCROLL );
ScrolledComposite sc = new ScrolledComposite( route_tab_comp2, SWT.V_SCROLL );
sc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

con_folder.setSelection( 0 );
Expand Down

0 comments on commit df46081

Please sign in to comment.