Since upgrading from 2018r3 to 2018r4, metal window title bars in MacOS are not respecting the background colour in debug or build. The IDE still shows the correct colour.
Dark mode support set to off for the project.
Since upgrading from 2018r3 to 2018r4, metal window title bars in MacOS are not respecting the background colour in debug or build. The IDE still shows the correct colour.
Dark mode support set to off for the project.
Have you enabled āSupports Dark Modeā in the āShared Settingsā for your app?
Never mind, I misread your last statement.
Metal windows were deprecated by Apple some time ago.
Probably best to remove the option from Xojo .
Without a metal window, how how to you achieve what Iāve seen called the unified window appearance, like Preview?
Thatās a ā ā ā ā ā ā . Iāve always used them as prefer the title bar matching the window colour. Is there an alternative method for achieving this?
A style of NSBorderlessWindowMask will move all buttons into the window itself. Then you could design the upper 22 or so points completely customized.
@Ulrich Bogun Thanks, but NSBorderlessWindowMask is overkill, it does a lot more than just allow a unified look. The metal window used to be perfect. But as of Xojo 2018R4 there is a slight line beneath the title bar. Itās subtle and doesnāt bother me. But a few uses have reported it to me.
BTW, you quoted James Cooksey, not me.
Weird. I just quoted via the quote button, so like now Ā
Deprecated != removed
I had the same problem after updating to 2018R4 and my bug report was closed with mention: āis not a bugāā¦
There are different possibilities to do this, the simplest is maybe to add a toolbox to the window, but that donāt help in every case. The example below (to add in the Open event) is another possibility to solve this problem:
[code]// To use with macOS SDK 10.10+
try
Const NSWindowStyleMaskFullSizeContentView = 32768 // Bitwise.ShiftLeft(1,15)
Declare Sub setStyleMask Lib āAppKitā Selector āsetStyleMask:ā (windowRef As Integer, value As Integer)
Declare Function styleMask Lib āAppKitā Selector āstyleMaskā (windowRef As Integer) As Integer
setStyleMAsk(Me.Handle, styleMask(Self.Handle) + NSWindowStyleMaskFullSizeContentView)
Declare Sub setTitlebarAppearsTransparent Lib āAppKitā Selector āsetTitlebarAppearsTransparent:ā (windowRef As Integer, value As Boolean)
Declare Sub setTitleVisibility Lib āAppKitā Selector āsetTitleVisibility:ā (windowRef As Integer, value As Integer)
setTitlebarAppearsTransparent(Self.Handle, True)
setTitleVisibility(Self.Handle,0) //0=Title visible, 1=Title hidden
end try[/code]
The following link shows an example for these three windows WinOSX.zip
[quote=427071:@Alain Clausen]I had the same problem after updating to 2018R4 and my bug report was closed with mention: āis not a bugāā¦
There are different possibilities to do this, the simplest is maybe to add a toolbox to the window, but that donāt help in every case. The example below (to add in the Open event) is another possibility to solve this problem:
[code]// To use with macOS SDK 10.10+
try
Const NSWindowStyleMaskFullSizeContentView = 32768 // Bitwise.ShiftLeft(1,15)
Declare Sub setStyleMask Lib āAppKitā Selector āsetStyleMask:ā (windowRef As Integer, value As Integer)
Declare Function styleMask Lib āAppKitā Selector āstyleMaskā (windowRef As Integer) As Integer
setStyleMAsk(Me.Handle, styleMask(Self.Handle) + NSWindowStyleMaskFullSizeContentView)
Declare Sub setTitlebarAppearsTransparent Lib āAppKitā Selector āsetTitlebarAppearsTransparent:ā (windowRef As Integer, value As Boolean)
Declare Sub setTitleVisibility Lib āAppKitā Selector āsetTitleVisibility:ā (windowRef As Integer, value As Integer)
setTitlebarAppearsTransparent(Self.Handle, True)
setTitleVisibility(Self.Handle,0) //0=Title visible, 1=Title hidden
end try[/code]
The following link shows an example for these three windows WinOSX.zip[/quote]
Alain, that is fantastic, thank you. Works a treat.
A really beautiful workaround which actually gives me more possibilities.
It would make sense that if Metal windows are no longer available, that they be removed from the IDE and not work in the IDE (currently they are an option, display correctly in IDE but do not display at runtime).
I hope we gave more info than that, but if we didnĀtā¦
The change that affected this in 2018r4 was the change in macOS SDK that your apps were compiled against. Up until then, we had been using 10.9 which meant that your apps (and ours) were limited to using older drawing engines. This update means that we are more aligned with what Xcode produces and allows your apps to access more recent technologies.
Yes I know that Greg, and itās a very good thing to have updated to SDK 10.14, thanks!
The problem here is more the information. No entry is to find about āMetal Windowā in the release note, the IDE allows to configure it and the compiler does not complain that this type of window is deprecated but it does not work anymore.
Updating projects using āMetal Windowā to 2018R4 changes the visual effect of the windows (only on 10.14) and we donāt know if itās normal, if itās a Mojave bug or if itās a Xojo bug⦠at the end, everyone loses a lot of time to search why and try to find a workaround.
Itās just my comment but I know itās not possible to test everything, especially with such a change.
Please donāt remove Metal Window as an option until Apple actually removes it. With it selected and the UI code kindly supplied by Alain Clausen above, I get exactly the look I want, a slightly darker title/toolbar area at the top than one would get if the window was a Document.
Jonathan:
Please consider what happened when Xojo removed the use of g (as Graphics) in Xojo 2018r4, how many people started to complain their code suddenly is no more workingĀ
(that feature was deprecated many years ago and the people who do not take that into account then were complaining when Xojo 2018r4 was released, in cascadeĀ
).
Yes, life is not easy.
We donāt remove things before Apple does
[quote=427106:@Alain Clausen]Yes I know that Greg, and itās a very good thing to have updated to SDK 10.14, thanks!
The problem here is more the information. No entry is to find about āMetal Windowā in the release note, the IDE allows to configure it and the compiler does not complain that this type of window is deprecated but it does not work anymore.
Updating projects using āMetal Windowā to 2018R4 changes the visual effect of the windows (only on 10.14) and we donāt know if itās normal, if itās a Mojave bug or if itās a Xojo bug⦠at the end, everyone loses a lot of time to search why and try to find a workaround.
Itās just my comment but I know itās not possible to test everything, especially with such a change.[/quote]
The issue is that we are not the ones that deprecated it⦠it was Apple. ItĀs not really practical for us to include all of their deprecated items for the last 5 years.