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++ Library support » Look and Chameleon Technology » Bug: Ctrl::NoLayoutZoom() has no effect
Bug: Ctrl::NoLayoutZoom() has no effect [message #35773] Mon, 19 March 2012 22:46 Go to next message
steffen is currently offline  steffen
Messages: 38
Registered: May 2007
Location: Denmark
Member

I'm using Upp-4193 on Ubuntu 10.10 64-bit.

My program should run on embedded hardware with a VGA screen and I was trying to test it without zooming. I designed my program to fit the 640x480 pixel VGA resolution, but the zooming makes it larger.

I would expect NoLayoutZoom to turn off the zooming, is that correct?

NoLayoutZoom calls ReSkin which resets the zooming before calling Csizeinit. It ends up with the same scale as before.

On my system (laptop) my default StdFont gives another size than hardcoded: Dsize = Size(99, 13), giving me a somewhat larger program window than expected.

Tomorrow I will try it on the embedded hardware to see if it scales correctly there.

Regards,
Steffen

Edit:
This is strange. I tried to build my project on another workstation and then suddenly the NoLayoutZoom function works.
It is using a local copy of uppsrc and they are different:
// Woking:
void Ctrl::NoLayoutZoom()
{
	GuiLock __;
	Csize = Dsize = Size(1, 1);
}

// NOT working:
void Ctrl::NoLayoutZoom()
{
	GuiLock __;
	Csize = Dsize = Size(1, 1);
	ReSkin();
}

Both systems are Upp-4193 on Ubuntu 10.10 64-bit, but U++ has been installed and updated for several years on the workstation.

Is there a way to see what version of uppsrc is in my local copy?

Would it be better for me to use the latest from svn?

[Updated on: Tue, 20 March 2012 08:47]

Report message to a moderator

Re: Bug: Ctrl::NoLayoutZoom() has no effect [message #36416 is a reply to message #35773] Fri, 25 May 2012 07:47 Go to previous messageGo to next message
steffen is currently offline  steffen
Messages: 38
Registered: May 2007
Location: Denmark
Member

I have made a small change to Ctrl to make the NoLayoutZoom function work again.
Since I only have a vague idea of how the Chameleon/skinning system works internally, I have made a solution that doesn't change the flow of operations in the original code.

The problem lies in one line in the Reskin function, that eliminates the effect of the NoLayoutZoom call. I added an extra static int to solve this.

I have attached my modified Ctrl files.
Original files was from svn: 4979

[Updated on: Fri, 25 May 2012 07:50]

Report message to a moderator

Re: Bug: Ctrl::NoLayoutZoom() has no effect [message #36454 is a reply to message #36416] Mon, 28 May 2012 17:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Patch applied, thank you.

Mirek
Re: Bug: Ctrl::NoLayoutZoom() has no effect [message #36469 is a reply to message #36454] Wed, 30 May 2012 14:19 Go to previous messageGo to next message
steffen is currently offline  steffen
Messages: 38
Registered: May 2007
Location: Denmark
Member

Hi Mirek,

Thank you for applying the patch. I just got the newest from svn and noticed you removed one line in NoLayoutZoom:
Csize = Dsize = Size(1, 1);

This unfortunately has the side effect of keeping the zoom functionality in the HorzLayoutZoom, VertLayoutZoom and LayoutZoom functions.
So calling TopPosZ, in my case resulted in a little more spacing than I hoped for. Confused

Btw. Thank you and all contributors for the awesome work your have put into U++. It's hard to learn but what a wonderful sight it is to look through the code I have completed until now.
Re: Bug: Ctrl::NoLayoutZoom() has no effect [message #36470 is a reply to message #36469] Wed, 30 May 2012 17:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
steffen wrote on Wed, 30 May 2012 08:19

Hi Mirek,

Thank you for applying the patch. I just got the newest from svn and noticed you removed one line in NoLayoutZoom:
Csize = Dsize = Size(1, 1);

This unfortunately has the side effect of keeping the zoom functionality in the HorzLayoutZoom, VertLayoutZoom and LayoutZoom functions.
So calling TopPosZ, in my case resulted in a little more spacing than I hoped for. Confused



I believe that immediate subseqent call to ReSkin should set it. Anyway, just to be sure, I have moved that line back.

Mirek
Re: Bug: Ctrl::NoLayoutZoom() has no effect [message #36472 is a reply to message #36470] Wed, 30 May 2012 21:24 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Sorry. Now the line is:
Csize = Dsize = 1;
, that is a compiling error:
error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int'


Best regards
IƱaki
Re: Bug: Ctrl::NoLayoutZoom() has no effect [message #36487 is a reply to message #36472] Fri, 01 June 2012 09:00 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Wed, 30 May 2012 15:24

Sorry. Now the line is:
Csize = Dsize = 1;
, that is a compiling error:
error C2679: binary '=' : no operator found which takes a right-hand operand of type 'int'



Should be fixed.

Mirek
Previous Topic: RichTextView and Chameleon with a dark background.
Next Topic: undesired behavior using custom styled MenuBar
Goto Forum:
  


Current Time: Fri Mar 29 11:14:20 CET 2024

Total time taken to generate the page: 0.01405 seconds