Xojo 2018r3
New project, Supports darkmode = true
Drag a scrollbar onto a window, run, its black
Old project, supports darkmode = true
Listboxes are in dark mode.
Window is in dark mode
Panels
But the scrollbars remain light mode.
Any ideas why?
Currently:
An 'old' document window with controls including 2 scrollbars, scrollbars and the window background stay white.
A second (newly created one) with scrollbars only, they go black
I have cleared the cache, I have no script in place.
I call no APIs on the problem window.
It has no custom color set
This happens to scrollbars I add to the problem window too.
The left project was done in 2015 R4.1, the right project in Xojo 2018 R3
Window1.ScrollBar1.-.PartID ShortProp right only PtID = 2108508159
After loading the old project into 2018 R3, enabling dark mode, and saving again I get two different property values
Window1.ScrollBar1.-.PartID ShortProp differ Property 575320063 2108508159
So make a copy of your old project, load it into Arbed, and maybe replace 575320063 by 2108508159
Btw done on MacOS Sierra 10.12.6, not Mojave.
So make a copy of your old project, load it into Arbed, and maybe replace 575320063 by 2108508159
Btw done on MacOS Sierra 10.12.6, not Mojave.
Thank you for looking into that.
I'll give this a try later today (just woke up)
@Jeff Tullin , have you tried 2018r4?
Not yet.
Because of "KillerToolbar" issues, anything 2018 onwards has been no use to me.
I've spent some time removing it and creating a new toolbar replacement from more or less scratch (with a lot of help from Dave S)
Now that I can run the project in 2018x, I can dump the trial 2018 R1 and r3 , and start again with R4
Stripped a lot of windows and controls and code.
Opened in 2018r3, while not set to 'supports dark mode'
A large canvas in the window turned black while the window stayed white ,but drew crazy corrupted lines when resized (the 'has to be 4 pixel wide' issue resurfacing??)
Started to generate a stripped down example:
Sadly, after removing all other windows, and all code, so that I ended up with only a handful of controls including the scrolls, darkmode started working. :(
Theres a lot of stuff to unpick if I try to isolate control by control.
Is the scrollbar on another control? Could it be a problem with transparency?
Good thinking, but the window itself doesnt go dark.
Some controls do, the scrollbars were the most obvious ones that did not.
I just found that the window didnt , after resizing the controls to ensure no overlaps
I had some, which I removed without apparently making a difference.
They are
#if TargetMacOS then
Declare Sub CGContextSetLineDash Lib "Cocoa" ( context As Integer, phase As Single, lengths As Ptr, count As UInt32)
#endif
#if TargetMacOS
Declare Sub setTitleWithRepresentedFilename Lib "Cocoa" Selector "setTitleWithRepresentedFilename:" _
(NSWindow As Ptr, filePath As CFStringRef)
//setTitleWithRepresentedFilename(Ptr(Handle), "abc.txt")
#endif
#if TargetMacOS then
Declare Function collectionBehavior Lib "AppKit" Selector "collectionBehavior" ( obj As Integer ) As UInteger
Declare Sub setCollectionBehavior Lib "AppKit" Selector "setCollectionBehavior:" ( obj As Integer, value As UInteger )
Const NSWindowCollectionBehaviorFullScreenAuxiliary As UInteger = 256
Dim behavior As UInteger = collectionBehavior(self.Handle)
setCollectionBehavior(self.handle, behavior Or NSWindowCollectionBehaviorFullScreenAuxiliary)
#endif