[GH-ISSUE #29] The tutorial Gui14 on ubuntu 18.04 doesn't have buttons well sized #15

Closed
opened 2026-05-05 03:34:05 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @mingodad on GitHub (Jan 5, 2021).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/29

When building the project for the tutorial Gui14 on ubuntu 18.04 the buttons do not have proper sizes see attached screenshot.

gui14

Originally created by @mingodad on GitHub (Jan 5, 2021). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/29 When building the project for the tutorial Gui14 on ubuntu 18.04 the buttons do not have proper sizes see attached screenshot. ![gui14](https://user-images.githubusercontent.com/462618/103639954-79d5d680-4f4f-11eb-8c5e-b09f165d7835.png)
Author
Owner

@klugier commented on GitHub (Jan 5, 2021):

What do you mean by "not have proper" size? It looks very similar to the reference image https://www.ultimatepp.org/srcdoc$CtrlLib$Tutorial_en-us.html#14. Also, the smaller buttons are intentional, because they show when auto scaling is disable (h and v prefix).

@mingodad

<!-- gh-comment-id:754586268 --> @klugier commented on GitHub (Jan 5, 2021): What do you mean by "not have proper" size? It looks very similar to the reference image https://www.ultimatepp.org/srcdoc$CtrlLib$Tutorial_en-us.html#14. Also, the smaller buttons are intentional, because they show when auto scaling is disable (h and v prefix). @mingodad
Author
Owner

@mingodad commented on GitHub (Jan 5, 2021):

Well it doesn't look like the tutorial pictures, the width of "hcenter-bottom" is croping the text and height is too just (again nothing like the tutorial picture).

<!-- gh-comment-id:754612569 --> @mingodad commented on GitHub (Jan 5, 2021): Well it doesn't look like the tutorial pictures, the width of "hcenter-bottom" is croping the text and height is too just (again nothing like the tutorial picture).
Author
Owner

@mingodad commented on GitHub (Jan 5, 2021):

Also I think that's a good idea to revise the GUI Tutorial because some examples give a bad image for the hard work done on Ultimate++ framework, see attached example of Gui20c on ubuntu 18.04.

gui20c

<!-- gh-comment-id:754707595 --> @mingodad commented on GitHub (Jan 5, 2021): Also I think that's a good idea to revise the GUI Tutorial because some examples give a bad image for the hard work done on Ultimate++ framework, see attached example of Gui20c on ubuntu 18.04. ![gui20c](https://user-images.githubusercontent.com/462618/103664823-fa59fe80-4f72-11eb-8af8-1db7b919c7b2.png)
Author
Owner

@klugier commented on GitHub (Jan 6, 2021):

Can you post the screen resolution you have? Is this UHD display? On my machine this example looks good.

<!-- gh-comment-id:755531038 --> @klugier commented on GitHub (Jan 6, 2021): Can you post the screen resolution you have? Is this UHD display? On my machine this example looks good.
Author
Owner

@ismail-yilmaz commented on GitHub (Jan 6, 2021):

@klugier

Can you post the screen resolution you have? Is this UHD display? On my machine this example looks good.

Gui20c doesn't look good on 1080p either.

Let's try this better anchored one for Gui20c?

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct MyAppWindow : TopWindow {
	Button ok, cancel;
	EditDate date;

	MyAppWindow() {
		SetRect(0, 0, 320, 90);
		Add(date.HSizePosZ(4, 4).TopPosZ(10, 24));
		Add(ok.SetLabel("OK").LeftPosZ(4, 64).BottomPosZ(4, 24));
		Add(cancel.SetLabel("Cancel").RightPosZ(4, 64).BottomPosZ(4, 24));

		ok.Ok() << Acceptor(IDOK);
		cancel.Cancel() << Rejector(IDCANCEL);
	}
};

GUI_APP_MAIN
{
	MyAppWindow app;
	switch(app.Run()) {
	case IDOK:
		PromptOK(String().Cat() << "OK: " << ~app.date);
		break;
	case IDCANCEL:
		Exclamation("Canceled");
	}
}
<!-- gh-comment-id:755553499 --> @ismail-yilmaz commented on GitHub (Jan 6, 2021): @klugier > Can you post the screen resolution you have? Is this UHD display? On my machine this example looks good. `Gui20c` doesn't look good on 1080p either. Let's try this better anchored one for Gui20c? ``` #include <CtrlLib/CtrlLib.h> using namespace Upp; struct MyAppWindow : TopWindow { Button ok, cancel; EditDate date; MyAppWindow() { SetRect(0, 0, 320, 90); Add(date.HSizePosZ(4, 4).TopPosZ(10, 24)); Add(ok.SetLabel("OK").LeftPosZ(4, 64).BottomPosZ(4, 24)); Add(cancel.SetLabel("Cancel").RightPosZ(4, 64).BottomPosZ(4, 24)); ok.Ok() << Acceptor(IDOK); cancel.Cancel() << Rejector(IDCANCEL); } }; GUI_APP_MAIN { MyAppWindow app; switch(app.Run()) { case IDOK: PromptOK(String().Cat() << "OK: " << ~app.date); break; case IDCANCEL: Exclamation("Canceled"); } } ```
Author
Owner

@mingodad commented on GitHub (Jan 7, 2021):

My screen resolution is 1920x1080, the Gui20c proposed by Ismail looks reasonable.

<!-- gh-comment-id:756063232 --> @mingodad commented on GitHub (Jan 7, 2021): My screen resolution is 1920x1080, the Gui20c proposed by Ismail looks reasonable.
Author
Owner

@mirek-fidler commented on GitHub (Jan 7, 2021):

First of all, thank you for you contributions, definitely appreciated.

I have gone through the tutorial, hopefully all should be now fixed.

On Thu, Jan 7, 2021 at 12:36 PM Domingo Alvarez Duarte <
notifications@github.com> wrote:

My screen resolution is 1920x1080.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/29#issuecomment-756063232,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH237FYXTROIKY2XU7I23SYWMC5ANCNFSM4VU4NYZA
.

<!-- gh-comment-id:756087491 --> @mirek-fidler commented on GitHub (Jan 7, 2021): First of all, thank you for you contributions, definitely appreciated. I have gone through the tutorial, hopefully all should be now fixed. On Thu, Jan 7, 2021 at 12:36 PM Domingo Alvarez Duarte < notifications@github.com> wrote: > My screen resolution is 1920x1080. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/ultimatepp/ultimatepp/issues/29#issuecomment-756063232>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AARH237FYXTROIKY2XU7I23SYWMC5ANCNFSM4VU4NYZA> > . >
Author
Owner

@mingodad commented on GitHub (Jan 7, 2021):

Looking through the commit 082cd6a339 I can see that several small changes where done, meaning that a review was indeed needed.

Thank you !

<!-- gh-comment-id:756201007 --> @mingodad commented on GitHub (Jan 7, 2021): Looking through the commit https://github.com/ultimatepp/ultimatepp/commit/082cd6a3390ca873ab6f169ca532172a27e1664d I can see that several small changes where done, meaning that a review was indeed needed. Thank you !
Author
Owner

@mingodad commented on GitHub (Jan 7, 2021):

I just updated my repository and the tutorial/Gui14 now look like the screenshots from the web.

Thank you again !

<!-- gh-comment-id:756208674 --> @mingodad commented on GitHub (Jan 7, 2021): I just updated my repository and the tutorial/Gui14 now look like the screenshots from the web. Thank you again !
Author
Owner

@klugier commented on GitHub (Jan 7, 2021):

As the problem was fixed. I am closing the issue.

<!-- gh-comment-id:756288372 --> @klugier commented on GitHub (Jan 7, 2021): As the problem was fixed. I am closing the issue.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#15
No description provided.