Page 1 of 1

UI Manager ui:Font PixelSize Attribute Not Supported in Resolve

Posted: Fri Apr 27, 2018 8:46 am
by AndrewHazelden
Fusion version:

Resolve Studio 15 Public Beta 2

OS and version:

MacOS 10.13.4 (High Sierra)

Additional relevant system info:



Description of the bug:

Lua scripts that create UI Manager GUIs in Resolve are unable to change the font size of the text since the ui:Font PixelSize attribute is ignored.

Severity (Trivial, Minor, Major, Critical)

Critical if you want to have a GUI in your Lua script and customize the look of the text.


Steps to reproduce:



Please, if possible, provide a Fusion setup to help demonstrate the behaviour, either as an attachment or between [code] tags:

If you run the sample "Label.lua" script in Fusion Studio 9.0.2 and Resolve 15 you can see the difference.

Fusion Studio ui:Font Screenshot


UI Manager Label in Fusion Studio 9.0.2.png

Resolve ui:Font Screenshot

UI Manager Label in Resolve 15.png

Example Script


  1. local ui = fu.UIManager
  2. local disp = bmd.UIDispatcher(ui)
  3. local width,height = 400,200
  4.  
  5. win = disp:AddWindow({
  6.     ID = 'MyWin',
  7.     WindowTitle = 'My First Window',
  8.     Geometry = {100, 100, width, height},
  9.     Spacing = 10,
  10.    
  11.     ui:VGroup{
  12.         ID = 'root',
  13.  
  14.         -- Add your GUI elements here:
  15.         ui:Label{
  16.             ID = 'txtLabel',
  17.             Text = 'This is a Label.',
  18.             Alignment = {
  19.                 AlignHCenter = true,
  20.                 AlignTop = true
  21.             },
  22.             -- This ui:Font PixelSize attribute will fail to work on Resolve 15 Build 27
  23.             Font = ui:Font{
  24.                 PixelSize = 38,
  25.             },
  26.         },
  27.     },
  28. })
  29.  
  30. -- The window was closed
  31. function win.On.MyWin.Close(ev)
  32.     disp:ExitLoop()
  33. end
  34.  
  35. -- Add your GUI element based event functions here:
  36. itm = win:GetItems()
  37.  
  38. win:Show()
  39. disp:RunLoop()
  40. win:Hide()
  41.  

Re: UI Manager ui:Font PixelSize Attribute Not Supported in Resolve

Posted: Wed May 15, 2019 8:58 pm
by SecondMan

Fixed in Resolve 16 public beta :cheer:


Re: UI Manager ui:Font PixelSize Attribute Not Supported in Resolve

Posted: Wed May 15, 2019 9:01 pm
by AndrewHazelden
SecondMan wrote:
Wed May 15, 2019 8:58 pm

Fixed in Resolve 16 public beta :cheer:

@SecondMan In Resolve 16.0.0B.017 the PixelSize attribute doesn't take effect for me. :(


Re: UI Manager ui:Font PixelSize Attribute Not Supported in Resolve

Posted: Wed May 15, 2019 9:09 pm
by SecondMan

That's odd, when I run the script above in the Console, this is what I get:

Image


Re: UI Manager ui:Font PixelSize Attribute Not Supported in Resolve

Posted: Wed May 15, 2019 9:17 pm
by AndrewHazelden

This is what I see in Resolve on macOS.

Resolve 16 on macOS PixelSize.png

Re: UI Manager ui:Font PixelSize Attribute Not Supported in Resolve

Posted: Wed May 15, 2019 9:29 pm
by SecondMan

Aha - more interesting. Are you running the above snippet in the console or your UI manager Label script from Reactor? With the latter I get this:

Image


Re: UI Manager ui:Font PixelSize Attribute Not Supported in Resolve

Posted: Wed May 15, 2019 9:58 pm
by SecondMan

Unmarking as fixed for now until we get to the bottom of this weirdness.