Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
deep is currently offline  deep
Messages: 173
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.

index.php?t=getfile&id=5060&private=0


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 Go to previous message
deep is currently offline  deep
Messages: 173
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
Previous Topic: TheIDE crashes when type of a widget is changed in layout designer
Next Topic: [PATCH] ColumnList and FileList widget representation for the layout designer.
Goto Forum:
  


Current Time: Sun Jun 25 22:51:42 CEST 2017

Total time taken to generate the page: 0.00685 seconds