Skip to content

Commit 8feca79

Browse files
committed
Some minor Windows dark mode fixes
1 parent 3bb1525 commit 8feca79

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

uis/src/com/biglybt/ui/swt/views/GeneralView.java

+11-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,13 @@ public void handleEvent(Event ev) {
986986

987987
loadThumb();
988988

989-
genComposite.layout();
989+
// If we force a layout on win dark mode the Link labels background flash white
990+
// Couldn't figure out why but not sure why we need this layout anyway
991+
992+
if ( !Utils.isDarkAppearanceNativeWindows()){
993+
994+
genComposite.layout();
995+
}
990996
}
991997

992998
public Composite getComposite() {
@@ -1529,6 +1535,10 @@ private void updatePiecesInfo(boolean bForce) {
15291535
return;
15301536
}
15311537

1538+
if ( pImage == null || pImage.isDisposed()){
1539+
bForce = true;
1540+
}
1541+
15321542
if ( piecesImageRefreshNeeded ){
15331543
bForce = true;
15341544
piecesImageRefreshNeeded = false;

uis/src/com/biglybt/ui/swt/views/TorrentInfoView.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public class TorrentInfoView
118118
}
119119

120120
if (showHeader) {
121-
Composite cHeader = new Composite(panel, SWT.BORDER);
121+
Composite cHeader = new Composite(panel, Utils.isDarkAppearanceNativeWindows()?SWT.NONE:SWT.BORDER);
122122
GridLayout configLayout = new GridLayout();
123123
configLayout.marginHeight = 3;
124124
configLayout.marginWidth = 0;

uis/src/com/biglybt/ui/swt/views/TorrentOptionsView.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
}
156156

157157
if (showHeader) {
158-
Composite cHeader = new Composite(panel, SWT.BORDER);
158+
Composite cHeader = new Composite(panel, Utils.isDarkAppearanceNativeWindows()?SWT.NONE:SWT.BORDER);
159159
GridLayout configLayout = new GridLayout();
160160
configLayout.marginHeight = 3;
161161
configLayout.marginWidth = 0;

0 commit comments

Comments
 (0)