[Done] PB 6.0-b7 ListViewGadget inverted text

Post bugreports for the Mac OSX version here
WilliamL
Addict
Addict
Posts: 1185
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

[Done] PB 6.0-b7 ListViewGadget inverted text

Post by WilliamL »

In this example, in Beta 7, the selected text is white and the line is gray.

Code: Select all

If OpenWindow(0, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ListViewGadget(0, 10, 10, 250, 120)
    For a = 1 To 12
      AddGadgetItem (0, -1, "Item " + Str(a) + " of the Listview") ; define listview content
    Next
    SetGadgetState(0, 9) ; set (beginning with 0) the tenth item as the active one
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
I was expecting a gray line with black text as in Beta 6
Last edited by WilliamL on Wed May 18, 2022 3:26 am, edited 1 time in total.
MacBook Pro-M1 (2021), Monterey 12.4, PB 6.0 Beta 10 M1-ARM64
Developer Tools 13.4, C Backend
User avatar
mk-soft
Addict
Addict
Posts: 3804
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Beta 7-ListView inverted text

Post by mk-soft »

Confirmed with Appearance Aqua

Code: Select all

Procedure EnableDarkMode(State)
  Protected NSApp, NSAppearance
  
  NSApp = CocoaMessage(0, 0, "NSApplication sharedApplication")
  If Not State
    NSAppearance = CocoaMessage(0, 0, "NSAppearance appearanceNamed:$", @"NSAppearanceNameAqua")
    CocoaMessage(0, NSApp, "setAppearance:", NSAppearance)
    CocoaMessage(0, 0, "NSAppearance setCurrentAppearance:", NSAppearance)
  Else
    CocoaMessage(0, NSApp, "setAppearance:", #nil)
    CocoaMessage(0, 0, "NSAppearance setCurrentAppearance:", #nil)
  EndIf
EndProcedure

EnableDarkMode(#False)

If OpenWindow(0, 0, 0, 270, 140, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ListViewGadget(0, 10, 10, 250, 120)
    For a = 1 To 12
      AddGadgetItem (0, -1, "Item " + Str(a) + " of the Listview") ; define listview content
    Next
    SetGadgetState(0, 2) ; set (beginning with 0) the tenth item as the active one
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Fred
Administrator
Administrator
Posts: 14732
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB 6.0-b7 ListViewGadget inverted text

Post by Fred »

Fixed.
Post Reply