Bug 139732 - configure konqueror - web shortcuts - change: dialogue is too wide
Summary: configure konqueror - web shortcuts - change: dialogue is too wide
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-07 20:22 UTC by Damir Perisa
Modified: 2011-06-09 08:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
illustration of the problem (304.03 KB, image/jpeg)
2007-01-07 20:24 UTC, Damir Perisa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damir Perisa 2007-01-07 20:22:40 UTC
Version:           3.5.5 (using KDE 3.5.5, Arch Linux)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.19-ARCH

the "Modify Search Provider" dialogue is too wide, if X is using mergedFB settings and two screens side-by side. (dekstop resolution 2560x1024, two screens with 1280x1024 side by side)

most probably, the dialogue width is set as a percentage of the desktop. it should be the percentage of the active screen instead.
Comment 1 Damir Perisa 2007-01-07 20:24:51 UTC
Created attachment 19166 [details]
illustration of the problem
Comment 2 Kurt Pfeifle 2007-01-08 01:50:26 UTC
Confirmed. Here SUSE-10.0/KDE-3.5.5

Width of dialog (on a notebook with 1400x1050 screen) is 100% of screen.

Could it be that the dialog is as long because of one of the "Search URIs" being very long, and the dialog adapting to the longest string in the list?
Comment 3 Damir Perisa 2007-01-08 02:04:04 UTC
could be - i have just made a guess with the percentage.

this way or that, it should have at least a max-width set to screen width, because if the window is wider than a screen, it becomes not usable any more.

... what makes me wonder is also that one cannot make it smaller.
Comment 4 Philip Rodrigues 2007-01-08 23:53:20 UTC
The guilty line is line 46 in kdebase/kcontrol/ebrowsing/ikws/searchproviderdlg.cpp:

m_dlg->leQuery->setMinimumWidth(kapp->fontMetrics().maxWidth() * 40);

Something like this is needed to make the dialog a sensible width (if you remove the line, the dialog is too narrow), but I don't know the best thing to do.
Comment 5 Philip Rodrigues 2007-01-08 23:57:17 UTC
FWIW, changing '40' to '20' seems alright.
Comment 6 Damir Perisa 2007-01-09 00:43:12 UTC
i'm no coder in qt... but can't you use something like

screenGeometry
public final QRect screenGeometry(QWidget widget)
Returns the geometry of the screen which contains widget.

instead of this fontMetrics? so that it is really limited with the screen-size. otherwise, it would be possible to make m_dlg wider than a screen if simply dependend on fontMetrics. if it is wider than a screen it becomes unusable, so we do not want that in any case, right? 
Comment 7 Damir Perisa 2007-01-09 00:46:17 UTC
sorry.. it is too late, i messed up what i wanted to write. 

what i meant is: in addition to setMinimumWidth(depending on the contents of the box) there should be also a SetMaximumWidth(depending on the screen size)
Comment 8 Jaime Torres 2008-05-31 10:52:17 UTC
It is almost fixed in trunk r813735, should be gone in final 4.1, review it again then.
Comment 9 Burkhard Lück 2011-05-11 09:14:46 UTC
This issue is fixed in Kubuntu 10.10 KDE 4.6.2 and master/branch 4.6 compiled from sources.
Comment 10 Burkhard Lück 2011-06-09 08:37:33 UTC
This ussue was fixed http://websvn.kde.org/?view=revision&revision=931086
by shaforo
Date: Tue Feb 24 19:00:20 2009 UTC (2 years, 3 months ago)
Log Message:
-modernize kuriikwsfiltereng.cpp with new qstring and co api. all tests are passing.
-compact searchproviderdlg