Window frame of tool has the same dimensions in Win-MAC-Linux?

This is a bit of a weird question but I need to know if the floating tool window (:show_custom_dialog) has the same dimensions in the frame for the 3 operating systems Windows, MAC and Linux.

That is, if the top bar has the same height in pixels, or the side lines of the frame have the exact same thickness and if the bottom line also has the same thickness.

If we create a tool that needs to calculate the entire window surface and we use an operating system like Windows 11, we need to know if the calculations are going to be exactly the same for MAC and for Linux.

Unfortunately, I don’t have the necessary computers to test all 3 platforms.

I assume that all these dimensions are equal, but I have no way of verifying this.

@Raul i could do windows + macOS for you, if you give me an example script. then take a screenshot of those.
would that help?

Yes!

local CONTENT
local vb = renoise.ViewBuilder()
local dialog_content=vb:column{
  margin=2,
  style="panel",
  vb:text{
    height=21,
    width=100,
    text="OS Plataform: "..os.platform()
  },
  vb:row {
    vb:row{
      margin=4,
      spacing=6,
      vb:row{
        id="ROW_1",
        margin=4,
        height=200,
        style="group",
        vb:valuefield{
          origin={x=0,y=0},
          align="center",
          height=19,
          width=200,
          min=0.00,
          max=10.00,
          value=5.00,
          tostring=function(value) return ("%.2f"):format(value) end,
          tonumber=function(value) return tonumber(value) end,
          notifier=function(value) prs_gui.ctrl_panel_hide() prs_gui.change_octaves(value,false) end
        }
      },
      vb:row{
        id="ROW_2",
        margin=4,
        height=200,
        style="plain",
        vb:textfield{
          --active=false,
          origin={x=55,y=0},
          align="center",
          height=19,
          width=200,
          text="Text",
          notifier=function(value) prs_gui.ctrl_panel_hide() prs_gui.change_octaves(value,false) end
        },
      },
      vb:button{
        height=100,
        width=100,
        text="Text\nButton"
      }
    }
  }
}
CONTENT=renoise.app():show_custom_dialog("Window Surface Test (Renoise "..renoise.RENOISE_VERSION..")", dialog_content)
return CONTENT

Puedes usar este código en TestPad.lua.

imagen

According to my screenshot, the total window area is 542 x 259 pixels. It should be the same size on MAC and Linux.

If there is even a 1 pixel difference, there may be a problem with the area calculation. I assume they should be exactly the same size.

Can you copy the two screenshots here?

Then I can compare the two images in 2 layers in an image editor to see what happens…

Thanks for helping me with this!

it immediately errors out at

*** std::logic_error: 'ViewBuilder: unknown property 'origin'.'
*** stack traceback:
***   [C]: in function 'valuefield'
***   main.lua:331: in main chunk

aka

        vb:valuefield{
          origin={x=0,y=0},

i commented it away and got an error on

       vb:textfield{
          --active=false,
          origin={x=55,y=0},

after commenting those two away (the origins) i got this:

my resolution on macOS is 1512x982 (and probably 2x’d up due to retina). i hope this helps somewhat.
something like 542x261 or so.
(i’m doing it by hand). so it does match 542x259.

Sorry for the ā€œoriginā€ lines. They shouldn’t be there.
On Windows it is possible to capture the window perfectly with a keyboard command. Isn’t there the same for MAC?

If the surface is the same on Windows and MAC, I assume the same will happen on Linux. It should be exactly the same. 1 pixel difference would result in calculation errors.

1 Like

no worries. i just commented them away.
i guess i could try and capture a window, let’s see.

there it is
so 1176x610 at 144dpi.
ĀÆ\_(惄)_/ĀÆ
but if i do it by hand, it’s close/identical to the actual information that you sent.

Thanks!

I’ve done the resolution conversion and yes, it matches! This is good. :grinning:

Only the layout of the top bar changes, but the size is the same…

1 Like

what are you hoping to accomplish, btw, i’m curious :slight_smile:

Resizing window with mouse pointer on outer frame edges. But if I design on Windows, it should be compatible with MAC and Linux, otherwise it can be a sea of ​​compatibility issues. But I think the API is well designed for this stuff. It will be compatible.

I haven’t tried it on Linux yet (I don’t have a machine) but I assume it will be compatible.

it would be neat if api allowed for placing dialogs somewhere in the resolutionspace.
… one can hope this’ll be there in the future.

The content of windows, will be the same on all platforms and the configured Renoise UI scaling defines the view point to pixel ratio on the screen.

The outer decorations (like Window title, extra borders) will be different on different platforms, as the OS takes care of decorating the window.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.