Lorentzos Roussos #: So if im looking at a font size that is proportionally okay on my screen , at 96 dpi then for another user. with 144 dpi i divide the font size by 1.5 ?
Have a look at the documentation regarding the terminal property "TERMINAL_SCREEN_DPI" and also do a search in the forum with that keyword.
TERMINAL_SCREEN_DPI
The resolution of information display on the screen is measured as number of Dots in a line per Inch (DPI).
Knowing the parameter value, you can set the size of graphical objects so that they look the same on monitors with different resolution characteristics.
int
Example of scaling factor calculation:
//--- Creating a 1.5 inch wide button on a screenint screen_dpi = TerminalInfoInteger(TERMINAL_SCREEN_DPI); // Find DPI of the user monitorint base_width = 144; // The basic width in the screen points for standard monitors with DPI=96int width = (button_width * screen_dpi) / 96; // Calculate the button width for the user monitor (for the specific DPI)
...
//--- Calculating the scaling factor as a percentageint scale_factor=(TerminalInfoInteger(TERMINAL_SCREEN_DPI) * 100) / 96;
//--- Use of the scaling factor
width=(base_width * scale_factor) / 100;
In the above example, the graphical resource looks the same on monitors with different resolution characteristics. The size of control elements (buttons, dialog windows, etc.) corresponds to personalization settings.
yes, but your issue is with mt4/5. to use the settings in the modern windows, the gui of mt4/5 has to be told to use it first; ie a gui update of mt4/5 program.
EDIT: you will notice if you change the windows res or 100% to 125% then, only some of the mt4/5 gui changes. Whereas 90% of other programs will increase size of all parts of their gui, without exception.
yes, but your issue is with mt4/5. to use the settings in the modern windows, the gui of mt4/5 has to be told to use it first; ie a gui update of mt4/5 program.
but it detects it after mt5 restarts , so it can read the proper dpi of a user's screen if it can read -even after a restart- the zoomed in dpi .
unless its fixed at 96 (in mt5) and if the user zooms in then it returns 144 ?
that would still work right ? because we will use the "flaw" as a starting point (96) because everyone has it
but it detects it after mt5 restarts , so it can read the proper dpi of a user's screen if it can read -even after a restart- the zoomed in dpi .
unless its fixed at 96 (in mt5) and if the user zooms in then it returns 144 ?
that would still work right ? because we will use the "flaw" as a starting point (96) because everyone has it
agreed. most likely, yes, but your first comment was regarding the initial changing of screen res via windows, prior to restarting mt5.
EDIT: and as your link in your first msg demonstrated, you can change the dpi of mt5 programmaticly as well; albeit the outcome aint predictable, much.
Lorentzos Roussos #:why do you multiply by 100?ow all ints okay , sorry ignore it
That was just because the user I originally coded it for at the time wanted it expressed in percentage (probably because that is how Windows expresses it).
You can ignore the 100 and just use it as a ratio which saves on the calculation.
Yes! ...
do you mean this setting ?
yes, but your issue is with mt4/5. to use the settings in the modern windows, the gui of mt4/5 has to be told to use it first; ie a gui update of mt4/5 program.
EDIT: you will notice if you change the windows res or 100% to 125% then, only some of the mt4/5 gui changes. Whereas 90% of other programs will increase size of all parts of their gui, without exception.yes, but your issue is with mt4/5. to use the settings in the modern windows, the gui of mt4/5 has to be told to use it first; ie a gui update of mt4/5 program.
but it detects it after mt5 restarts , so it can read the proper dpi of a user's screen if it can read -even after a restart- the zoomed in dpi .
unless its fixed at 96 (in mt5) and if the user zooms in then it returns 144 ?
that would still work right ? because we will use the "flaw" as a starting point (96) because everyone has it
but it detects it after mt5 restarts , so it can read the proper dpi of a user's screen if it can read -even after a restart- the zoomed in dpi .
unless its fixed at 96 (in mt5) and if the user zooms in then it returns 144 ?
that would still work right ? because we will use the "flaw" as a starting point (96) because everyone has it
agreed. most likely, yes, but your first comment was regarding the initial changing of screen res via windows, prior to restarting mt5.
EDIT: and as your link in your first msg demonstrated, you can change the dpi of mt5 programmaticly as well; albeit the outcome aint predictable, much.Yes! ...
why do you multiply by 100?
ow all ints okay , sorry ignore it
agreed. most likely, yes, but your first comment was regarding the initial changing of screen res via windows, prior to restarting mt5.
yeah , i was 100% sure that going down on resolution would alter the DPI , that does not happen even with a restart
Lorentzos Roussos #: do you mean this setting ?
At 100%, it is always 96 dpi. So at 125% and 150%, it is 120dpi and 144dpi respectively.
That was just because the user I originally coded it for at the time wanted it expressed in percentage (probably because that is how Windows expresses it).
You can ignore the 100 and just use it as a ratio which saves on the calculation.
At 100%, it is always 96 dpi. So at 125% and 150%, it is 120dpi and 144dpi respectively.
Nice thanks
So essentially the method is :
It looks good on this screen , what is this screen dpi
Adapt to fit to that on other screens
and add the resolution into the mix too somehow
why do you multiply by 100?
ow all ints okay , sorry ignore it
yeah , i was 100% sure that going down on resolution would alter the DPI , that does not happen even with a restart
hence why i said " outcome aint unpredicable" :D
It looks good on this screen , what is this screen dpi
Adapt to fit to that on other screens
and add the resolution into the mix too somehow