Home » U++ TheIDE » U++ TheIDE: Layout (Forms) Designer » Layout scaling different on two machines.
Layout scaling different on two machines. [message #46957] |
Thu, 29 September 2016 08:10  |
 |
deep
Messages: 266 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi,
Working with 1366x768 display size.
I want to do pixel perfect rendering of the panels on application.
I want one particular panel to be 886x308.
While designing layout what I get is
1250 pixels on Ubuntu and 950 pixels on windows. It is on same dual boot machine.
Where as I want actual display to 886 pixels on both at run time.
How to achieve this.
Warm Regards
Deepak
[Updated on: Thu, 29 September 2016 15:56] Report message to a moderator
|
|
|
Re: Layout scaling different on two machines. [message #46962 is a reply to message #46957] |
Fri, 30 September 2016 09:04  |
 |
deep
Messages: 266 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi,
I found out work around for my requirement.
It is not generic solution. but will work for me.
It is quick fix. Will use is for the specific project
I modified CtrlCore/Ctrl.cpp file
Then compiled IDE. Will use it from different folder along with its sources.
void InitRichTextZoom()
{
Ctrl::Bsize = Ctrl::Csize = Ctrl::Dsize = Size(1, 1); // NO ZOOM EVER
Size h = 96 * Ctrl::Bsize / Ctrl::Dsize;
SetRichTextStdScreenZoom(min(h.cx, h.cy), 600);
Ctrl::ReSkin();
}
void Ctrl::Csizeinit()
{
GuiLock __;
if(Csize.cx == 0 || Dsize.cx == 0) {
if(Csize.cx == 0)
Csize = GetTextSize(sZoomText, StdFont());
Bsize = Csize;
if(Dsize.cx == 0)
Dsize = Size(99, 13);
Csize.cx = max(Csize.cx, Dsize.cx);
Csize.cy = max(Csize.cy, Dsize.cy);
Bsize = Csize = Dsize = Size(1, 1); // NO ZOOM EVER
InitRichTextZoom();
}
}
void Ctrl::SetZoomSize(Size sz, Size bsz)
{
GuiLock __;
Csize = sz;
Dsize = bsz;
IsNoLayoutZoom = false;
Bsize = Csize = Dsize = Size(1, 1); // NO ZOOM EVER
ReSkin();
}
Added lines where NO ZOOM EVER comment is there.
Warm Regards
Deepak
|
|
|
Goto Forum:
Current Time: Fri Apr 25 17:52:23 CEST 2025
Total time taken to generate the page: 0.01980 seconds
|