Ticket #262 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Umit GUI doesn't fit in small screens

Reported by: lupa Owned by: boltrix
Priority: medium Milestone: Umit 1.0RC
Component: Umit Version:
Keywords: screen size Cc:

Description

When using Umit on small screens (like 800x600) the user cannot have access to all funcionalities cause some of them are out of the screen, like the Highlight Toolbar on the NmapOutput? page or Fisheyebar on Topology page.

To solve this problem you just need to comment the size request.

Patch Attached.

Obs.: To work perfectly, this patch must be applied after the patch from Ticket #259, otherwise the buttons on the Highligth toolbar will resize.

Attachments

screen_size.diff (0.6 kB) - added by lupa 4 years ago.
This patch solves the problem
ticket_262.patch (1.1 kB) - added by getxsick 4 years ago.
new version
ticket_262_c.patch (1.2 kB) - added by getxsick 4 years ago.
first patch use fixed initial size of main window. this one calculate and depends on screensize. i think some extra fancy math can be added. what do you propose? :)
ticket_262.diff (1.5 kB) - added by ignotus 4 years ago.
262-d.patch (1.1 kB) - added by getxsick 4 years ago.

Change History

Changed 4 years ago by lupa

This patch solves the problem

  Changed 4 years ago by gpolo

  • milestone changed from Umit 1.0beta2 to Umit 1.0

follow-up: ↓ 3   Changed 4 years ago by ignotus

  • priority changed from low to medium
  • type changed from patch to defect
  • milestone changed from Umit 1.0 to Umit 1.0beta2

If the user maximize the Umit window at small resolutions (e.g. 800x600) the inputs seems to freeze (try to digit something into target or select any scan profile). This problem is related in some way to the size restriction (gtk.Widget.set_size_request()) of NmapOutputViewer?. This patch solves this defect.

However, the windows initial size is too small. So is better set the Umit window size to something bigger (e.g. 640x480?) using gtk.Window.set_default_size(). Can you do it lupa?

in reply to: ↑ 2   Changed 4 years ago by ignotus

Just to make clear. The problem happened at Windows XP, not tested at other operating systems.

  Changed 4 years ago by gpolo

  • milestone changed from Umit 1.0beta2 to Umit 1.0

  Changed 4 years ago by lupa

Ok, I'm going to take a look on this.

  Changed 4 years ago by gpolo

  • milestone changed from Umit 1.0 to Umit 1.0beta3

Changed 4 years ago by getxsick

new version

  Changed 4 years ago by getxsick

new patch is lupa's fix + set for default mainwindow size to 640x480. please test it

Changed 4 years ago by getxsick

first patch use fixed initial size of main window. this one calculate and depends on screensize. i think some extra fancy math can be added. what do you propose? :)

Changed 4 years ago by ignotus

  Changed 4 years ago by ignotus

I attached a patch which follows getxsick idea. I just changed the place to don't affect maemo and removed the maximization code (some people don't like windows that don't follow their preferences).

I don't put 1024x768 because I found it too big. The -40 and -30 (keep aspect 4:3 of vga standard) are related to avoid be over or under desktop panels (maybe must be more, e.g. for KDE). Of course we can put the value already subtracted, I did this way to avoid "why this values" comments.

Moreover, I found some \t into MainWindow?.py code. Removed!

follow-up: ↓ 10   Changed 4 years ago by getxsick

If screensize is smaller than 640x480 your patch doesn't do anything. It means that GTK will set size as much big to fit all widgets, am I right? What if this size would be bigger than screensize? A window size will be still bigger? If so, this patch goes in a way which i don't like. If it will set then to fullsize i don't see a difference from maximize().

I have more to say but I need to know the answer on that questions first.

in reply to: ↑ 9   Changed 4 years ago by ignotus

Replying to getxsick:

If screensize is smaller than 640x480 your patch doesn't do anything. It means that GTK will set size as much big to fit all widgets, am I right?

It means that gtk will use the minimum size that allow use the application (actually 564x344).

What if this size would be bigger than screensize? A window size will be still bigger? If so, this patch goes in a way which i don't like.

If the screen is smaller then this minimum size I don't see anything we can do. BTW, what is smaller then ~ 564x344 (cellphones)? In that cases other things must be done beyond application size.

If it will set then to fullsize i don't see a difference from maximize().

Where are we setting the fullsize?

I have more to say but I need to know the answer on that questions first.

Waiting... ;)

Changed 4 years ago by getxsick

follow-up: ↓ 12   Changed 4 years ago by getxsick

I don't see the reason to keep the second if statement because a difference between 600x450 and 565x344 is pretty small and to be honest, users with so low resulution would preffer as small as possible window. also we shouldn't rely on current minimum window size. so i attached new patch. ah, i put that "math" as a comment, it's enough to avoid question and it's better ;-)

in reply to: ↑ 11   Changed 4 years ago by ignotus

Replying to getxsick:

I don't see the reason to keep the second if statement because a difference between 600x450 and 565x344 is pretty small and to be honest, users with so low resulution would preffer as small as possible window. also we shouldn't rely on current minimum window size. so i attached new patch. ah, i put that "math" as a comment, it's enough to avoid question and it's better ;-)

It's good for me.

follow-up: ↓ 14   Changed 4 years ago by nopper

I'm not pretty sure about this solution. It's only a workaround taking care of 800x600 resolution. As getxsick says with a cell phone the situation will be the same I guess.

Imho we should also add a button to the toolbar to make it possible to use umit in fullscreen in conjunction with this patch, so we can avoid further problems on smaller devices. Or better implement a plugin that does it without touching the UMIT 's code.

in reply to: ↑ 13   Changed 4 years ago by getxsick

Replying to nopper:

I'm not pretty sure about this solution. It's only a workaround taking care of 800x600 resolution. As getxsick says with a cell phone the situation will be the same I guess.

We divide resolutions for 2: smaller and greater than 800x600. for smaller GTK handles with window size in good way, for bigger we use fixed size. anyway, for bigger one would be nice to detect minimum window size and then add +100x50 or something like, it would avoid further problems if our mainwindow would grow up. GTK provides those kind of function? or we have to just not to set any window size, let GTK to set minimum, then grab window size and e.g. +100x50. but doing it by this way, user would see window size changing. so it's ugly.

Imho we should also add a button to the toolbar to make it possible to use umit in fullscreen in conjunction with this patch, so we can avoid further problems on smaller devices. Or better implement a plugin that does it without touching the UMIT 's code.

there is fullscreen for topology currently. we could remove it and use fullscreen for whole umti window as a plugin.

follow-up: ↓ 16   Changed 4 years ago by ignotus

I don't like the idea of touch topology fullscreen button. There is no problem with this functionality. And there is no reason to be careful of cellphones now. This ticket was created just because people don't be able to use Umit as they can in small desktop resolutions(e.g. lupa discover this problem using Umit at a 800x600 virtual machine).

Resuming +1 to apply as it is.

in reply to: ↑ 15   Changed 4 years ago by luis

Replying to ignotus:

I don't like the idea of touch topology fullscreen button. There is no problem with this functionality. And there is no reason to be careful of cellphones now. This ticket was created just because people don't be able to use Umit as they can in small desktop resolutions(e.g. lupa discover this problem using Umit at a 800x600 virtual machine). Resuming +1 to apply as it is.

I tested the patch. It works fine. It avoid problems with low resolutions (like 640x480). Sounds good to fix this issue.

  Changed 4 years ago by getxsick

  • status changed from new to closed
  • resolution set to fixed

last patch applied as r4581

thanks

Note: See TracTickets for help on using tickets.