After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698127 - Align text correctly on SETUP page
Align text correctly on SETUP page
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: wizard
3.8.x
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on: 700817
Blocks:
 
 
Reported: 2013-04-16 12:39 UTC by Zeeshan Ali
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of the issue (235.82 KB, image/png)
2013-04-16 12:39 UTC, Zeeshan Ali
  Details
unattended-installer: Add baseline alignment to setup screen (1.94 KB, patch)
2013-05-03 23:07 UTC, Gursimran singh
reviewed Details | Review
Screenshot of the fix + regression (231.69 KB, image/png)
2013-05-04 01:13 UTC, Zeeshan Ali
  Details
Screenshot of boxes vs other app (216.77 KB, image/png)
2013-05-05 22:24 UTC, Gursimran singh
  Details
Require gtk+ >= 3.9 (768 bytes, patch)
2013-05-07 21:38 UTC, Zeeshan Ali
committed Details | Review
unattended-installer: Add baseline alignment to setup screen (2.12 KB, patch)
2013-05-07 21:38 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2013-04-16 12:39:01 UTC
Created attachment 241634 [details]
Screenshot of the issue

The text on the same rows need to be aligned to each other. As you can see in the attached screenshot, 'username' and 'zeenix' are not aligned. Neither are 'password' and 'Add password'.
Comment 1 Gursimran singh 2013-04-27 17:37:41 UTC
Can you please mention the steps to reproduce this screen. In my case when I select an iso from the "Source Selection" the wizard directly jumps to "Review".
I never reach on preparation.
Comment 2 Zeeshan Ali 2013-04-27 18:41:53 UTC
You need to use an OS for which we support express installation. Currently those are: Fedora (15 onwards), RHEL 6.x, windows XP and windows 7.
Comment 3 Zeeshan Ali 2013-04-27 18:53:11 UTC
Seems this *might* require the latest additions to gtk+ (git master): 

http://blogs.gnome.org/mclasen/2013/04/23/gtk-hackfest-days-3-and-4/

"Alex has just merged his baseline alignment branch – this lets us align widgets like spin buttons, buttons, labels so that their text is at the same level, visually."
Comment 4 Gursimran singh 2013-04-29 22:56:29 UTC
Even with fedora 18, I still don't get preparation screen

gursimran@debian:~/iso$ jhbuild run osinfo-detect Fedora-18-i686-Live-Desktop.iso 
Media is bootable.
Media is an installer for OS 'Fedora 18'
Media is live media for OS 'Fedora 18'

gursimran@debian:~/iso$ osinfo-detect ./Fedora-18-i686-Live-Desktop.iso 
Media is bootable.
Comment 5 Zeeshan Ali 2013-04-29 23:28:36 UTC
(In reply to comment #4)
> Even with fedora 18, I still don't get preparation screen
> 
> gursimran@debian:~/iso$ jhbuild run osinfo-detect
> Fedora-18-i686-Live-Desktop.iso 
> Media is bootable.
> Media is an installer for OS 'Fedora 18'
> Media is live media for OS 'Fedora 18'
> 
> gursimran@debian:~/iso$ osinfo-detect ./Fedora-18-i686-Live-Desktop.iso 
> Media is bootable.

The last one means that libosinfo on your system (outside jhbuild) is too old and its irrelevant anyways.

I might have a clue here. Do you select the ISO from the list in the wizard or from file/URI? If former, the list is fetched from tracker and I'm pretty sure its the system tracker that is being used and therefore system libosinfo. If I'm correct, either build and run tracker inside jhbuild (won't recommend for you at this time at least) or always use the file selection method.

If I'm wrong, I really dont understand whats going on your system.
Comment 6 Gursimran singh 2013-04-30 06:54:05 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Even with fedora 18, I still don't get preparation screen
> > 
> > gursimran@debian:~/iso$ jhbuild run osinfo-detect
> > Fedora-18-i686-Live-Desktop.iso 
> > Media is bootable.
> > Media is an installer for OS 'Fedora 18'
> > Media is live media for OS 'Fedora 18'
> > 
> > gursimran@debian:~/iso$ osinfo-detect ./Fedora-18-i686-Live-Desktop.iso 
> > Media is bootable.
> 
> The last one means that libosinfo on your system (outside jhbuild) is too old
> and its irrelevant anyways.
> 
> I might have a clue here. Do you select the ISO from the list in the wizard or
> from file/URI? If former, the list is fetched from tracker and I'm pretty sure
> its the system tracker that is being used and therefore system libosinfo. If
> I'm correct, either build and run tracker inside jhbuild (won't recommend for
> you at this time at least) or always use the file selection method.
> 
> If I'm wrong, I really dont understand whats going on your system.

I dont see any list of OSs as 
http://en.wikipedia.org/wiki/File:GNOME_Boxes_Source_Selection_Screen.png
I can only see 
Enter URL and 
Select a file

So I always choose "Select a file" method.

The problem may be related to the fact that I cant see any list, anyways I will try to investigate..
Comment 7 Gursimran singh 2013-04-30 09:02:07 UTC
I'm not able to reach to preparation screen because the following filter is not executing to true. install_media is null

    private bool prepare () {
        installer_image.set_from_icon_name ("media-optical", 0); // Reset
        if (this.wizard_source.install_media != null) {
	

launch_file_selection_dialog () explicitly sets it to null (although these is some explanation)

however i could not find why it remains null afterwards...??
Comment 8 Gursimran singh 2013-05-03 23:07:40 UTC
Created attachment 243259 [details] [review]
unattended-installer: Add baseline alignment to setup screen

Added baseline alignment to username (label and entry) and
password (label and notebook). Closes bgo#698127
Comment 9 Zeeshan Ali 2013-05-03 23:47:56 UTC
Review of attachment 243259 [details] [review]:

Looks good but I can't test it since it seems vala bindings have not be updated. How did you test it?

About git-bz usage, now i recall why I assumed you previously didn't use it. There is no bug URL at the bottom of the commit log that git-bz automatically adds. You'll not have needed "Closes bgo#698127" part then.
Comment 10 Gursimran singh 2013-05-04 00:49:02 UTC
1. I used .vapi file that nemequ provided me.
http://pastebin.com/yDjYxGpF --- gtk+-3.0.vapi

2. Got the .deps file from the sources of latest vala/vapi/gtk+-3.0.deps

3. and put these two here
~/checkout/gnome/gnome-boxes/vapi  --  gtk+-3.0.deps  gtk+-3.0.vapi

4. Try rebuilding make && make install in jhbuild shell

Actually I read the instructions here
https://live.gnome.org/Git/CommitMessages

Should I rebuild the patch without using "closes bgo#"??
Comment 11 Zeeshan Ali 2013-05-04 01:06:38 UTC
(In reply to comment #10)
> 1. I used .vapi file that nemequ provided me.
> http://pastebin.com/yDjYxGpF --- gtk+-3.0.vapi
> 
> 2. Got the .deps file from the sources of latest vala/vapi/gtk+-3.0.deps
> 
> 3. and put these two here
> ~/checkout/gnome/gnome-boxes/vapi  --  gtk+-3.0.deps  gtk+-3.0.vapi
> 
> 4. Try rebuilding make && make install in jhbuild shell

OK I'll do that for testing but this patch can't be merged before this is provided by vala and we need to bump the vala dependency in configure.

> Actually I read the instructions here
> https://live.gnome.org/Git/CommitMessages

That part has a note on it: "This is not part of the guidelines yet."

> Should I rebuild the patch without using "closes bgo#"??

Yeah, perhaps the bug reference make git-bz not add yet another ref. Try removing that and use `git bz attach -e BUG COMMIT_REF` to attach.

Note btw, this is not at all a big deal. Would just be nice to follow the same format as other commits for bug references.
Comment 12 Zeeshan Ali 2013-05-04 01:13:00 UTC
Created attachment 243263 [details]
Screenshot of the fix + regression

Patch fixes the issue but it introduces a regression: 'Add password' button is now bigger than it should be.
Comment 13 Gursimran singh 2013-05-05 12:28:32 UTC
notebook.valign = Gtk.Align.START; 
compresses the widget vertically and we have the old view.

If we remove this the size is same as the baseline alignment size.
However each alignment setting changes the size and position of the widget a bit to make them appear in alignment.

I'm currently trying to understand (by generating test cases) what could be the best way to manage this problem. Possible by setting appropriate top margin we can prevent the widget from resizing itself when we align it.
Comment 14 Gursimran singh 2013-05-05 12:30:20 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > 1. I used .vapi file that nemequ provided me.
> > http://pastebin.com/yDjYxGpF --- gtk+-3.0.vapi
> > 
> > 2. Got the .deps file from the sources of latest vala/vapi/gtk+-3.0.deps
> > 
> > 3. and put these two here
> > ~/checkout/gnome/gnome-boxes/vapi  --  gtk+-3.0.deps  gtk+-3.0.vapi
> > 
> > 4. Try rebuilding make && make install in jhbuild shell
> 
> OK I'll do that for testing but this patch can't be merged before this is
> provided by vala and we need to bump the vala dependency in configure.
I guess it has to wait a bit then..
> 
> > Actually I read the instructions here
> > https://live.gnome.org/Git/CommitMessages
> 
> That part has a note on it: "This is not part of the guidelines yet."
Ah! I missed that.. Got it..
> 
> > Should I rebuild the patch without using "closes bgo#"??
> 
> Yeah, perhaps the bug reference make git-bz not add yet another ref. Try
> removing that and use `git bz attach -e BUG COMMIT_REF` to attach.
I can do that.. thanks
> 
> Note btw, this is not at all a big deal. Would just be nice to follow the same
> format as other commits for bug references.
I understand that..
Comment 15 Gursimran singh 2013-05-05 22:24:26 UTC
Created attachment 243359 [details]
Screenshot of boxes vs other app

It seems that BASELINE behaves like FILL, and the widget stretches to maximum possible size that Grid row provides.

Possibly, the cause of problem is that, normal height of a row of Grid in Boxes is larger than usual (screenshot attached). TextEntry maintains its intrinsic size irrespective to the size of Grid row so it appears the same. However Button stretches to maximum possible size.

Currently, I'm not able to reach any conclusion why Grid has rows of more height that usual.
Comment 16 Zeeshan Ali 2013-05-07 21:38:29 UTC
Created attachment 243542 [details] [review]
Require gtk+ >= 3.9

So that we can make use of baseline alignment API.
Comment 17 Zeeshan Ali 2013-05-07 21:38:38 UTC
Created attachment 243543 [details] [review]
unattended-installer: Add baseline alignment to setup screen

Added baseline alignment to username (label and entry) and
password (label and notebook).
Comment 18 Christophe Fergeau 2013-05-13 13:22:27 UTC
Review of attachment 243543 [details] [review]:

This needs updated vapi files if I've followed the bug correctly. Looks good otherwise
Comment 19 Zeeshan Ali 2013-08-21 13:23:16 UTC
Attachment 243542 [details] pushed as 894f97c - Require gtk+ >= 3.9
Attachment 243543 [details] pushed as 59d694a - unattended-installer: Add baseline alignment to setup screen
Comment 20 Zeeshan Ali 2013-08-21 13:24:35 UTC
(In reply to comment #18)
> Review of attachment 243543 [details] [review]:
> 
> This needs updated vapi files if I've followed the bug correctly. Looks good
> otherwise

Yup, Required vala version bumped to 0.21.1.