New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

How can I resize the side panes?

General discussion

How can I resize the side panes?

Postby Racachaquero » Wed May 09, 2012 6:27 am

Good day everybody :mrgreen:

I'm trying to make the side-panes (results navigation pane and search pane) smaller, narrower, as my screen resolution is small, and they are taking up both summed nearly the half of it, leaving a small space for the main results frame.

I tried to do it selecting the border and resizing them, but there's a limit I can't go beyond, and they are still too wide for me. It doesn't matter how much I try to, they won't get narrower.

This is exactly how it looks like, at actual resolution: http://img268.imageshack.us/img268/8636/screenov.png

I'm using version 296d6d5 compiled from git on Ubuntu 10.04.

Thank you for your help, it's very much appreciated.
Last edited by Racachaquero on Sun May 13, 2012 5:38 am, edited 2 times in total.
Racachaquero
 
Posts: 11
Joined: Thu Jan 12, 2012 8:36 am
Location: Finis Terræ

Re: How can I resize the side panels?

Postby chulai » Sun May 13, 2012 2:41 am

Currently you can't. There is a minimum width hardcoded in the application. But if you have some programming knowledge it's quite easy to modify the UI forms to do this.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: How can I resize the side panels?

Postby Racachaquero » Sun May 13, 2012 5:34 am

chulai wrote:Currently you can't. There is a minimum width hardcoded in the application. But if you have some programming knowledge it's quite easy to modify the UI forms to do this.


Would you give me a hand with this? which files do I have to edit? would you please tell me more or less how to do it?

Will you be adding this feature in a near future?

The thing is that I'll use this low resolution, small screen netbook for some years, and I'd like to get this solved because I use GD everyday.

A temporary but not comfortable workaround I've implemented at the moment is to place the unattached search pane at the top, above all the other options and hiding a little of the article. And I removed completely the results pane. In my opinion (and if this can be done modifying the source files before compiling, I beg you to also tell me how) the results pane should only show the icons for the dictionaries. Showing the full name should be optional, as it takes a lot of useful space. This is how it looks like: http://img689.imageshack.us/img689/9839/pantallazo1d.png

So I'll be waiting for your advices guys. Thank you very much in advance for your help.
Racachaquero
 
Posts: 11
Joined: Thu Jan 12, 2012 8:36 am
Location: Finis Terræ

Re: How can I resize the side panes?

Postby chulai » Sun May 13, 2012 8:10 pm

Ok, I assume you know how to get source code from a Git repository and have previous experience building a program from source.

1) Install Git core package.

2) Create a goldendict folder somewhere.

2) Open a terminal window and on that folder get the source code with:
Code: Select all
$ git clone https://github.com/goldendict/goldendict


3) Install all dependency packages. They are all listed here: http://goldendict.org/buildfromgit.php

In addition to those you have to install libbz2-dev.

4) Modify mainwindow.ui file:

a) Locate line:
Code: Select all
<widget class="QDockWidget" name="searchPane">


b) Add the following just below:

Code: Select all
<property name="sizePolicy">
    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
   </property>
   <property name="minimumSize">
    <size>
     <width>0</width>
     <height>123</height>
    </size>
   </property>


c) Locate line:
Code: Select all
<widget class="QLineEdit" name="translateLine">


d) Modify width from
Code: Select all
<width>200</width>
to
Code: Select all
<width>0</width>


e) Locate line:
Code: Select all
<widget class="QDockWidget" name="dictsPane">


f) Add the following just below:

Code: Select all
<property name="sizePolicy">
    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
   </property>
   <property name="minimumSize">
    <size>
     <width>0</width>
     <height>97</height>
    </size>
   </property>


Another option is to modify this form with the Qt Creator visual tool.

5) Compile:
Code: Select all
$ qmake && make


6) Run from the build directory:
Code: Select all
$ ./goldendict


You should be able to stretch the frames even more.

Note that the "Found in Dictionaries:" label, the "Look up in:" drop-down and text entry fields they all prevent the frames from stretching to 0px width.

Hope that helps,

Chulai
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm


Return to General

Who is online

Users browsing this forum: No registered users and 31 guests

cron