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 » U++ Widgets - General questions or Mixed problems » Zooming layouts and different behaviour windows/linux
Re: Zooming layouts and different behaviour windows/linux [message #33512 is a reply to message #33506] Wed, 17 August 2011 19:12 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Mirek and Massimo.

mirek wrote on Mon, 15 August 2011 15:28


OK, I have tried to make chameleon detect changes made to the font later, so perhaps it will now work...


It is not necessary, in my opinion, at least for this case. What it really adds is some overhead to check font of each Ctrl in constructor, which noticable for applications with many Ctrls, even for TheIDE.
mdelfede wrote on Wed, 17 August 2011 13:43


Yep it works now... it's enough to change font height on GUI_APP_MAIN and all layouts gets resized.


With changes, which Mirek added, it is possible to change default font size for Ctrls inside GUI_APP_MAIN, as you said. You could achieve the same with INITBLOCK, without such changes before:
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

INITBLOCK {
	SetStdFont(StdFont(20));
}

class App : public TopWindow {
public:
	typedef App CLASSNAME;
	App();

	TabCtrl tabs;
	EditString text;
};

App::App()
{
	Title("TabCtrl size test");
	CenterScreen().Sizeable().MinimizeBox().MaximizeBox();
	SetRect(Size(640, 480));

	Add(tabs.VSizePosZ(4, 4).HSizePosZ(4, 4));
	Add(text.RightPosZ(4, 100).TopPosZ(4, 19));

	tabs.Add("First"); tabs.Add("Second"); tabs.Add("Third");
	text.SetData("Some text");
}

GUI_APP_MAIN
{
	App app;
	app.Run();
}

I suggest you, Massimo, to provide full testcase with your problem, not just screenshots.
I see from screenshots, that different fonts and font sizes used for Windows and Linux environments, which configurable.

[Updated on: Wed, 17 August 2011 19:22]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PushButton with text in the bottom
Next Topic: What is best way to obtain button info via callback?
Goto Forum:
  


Current Time: Sun Apr 28 06:23:50 CEST 2024

Total time taken to generate the page: 0.02893 seconds