Author Topic: Project properties dialog too high  (Read 4380 times)

Offline Olivia

  • Single posting newcomer
  • *
  • Posts: 6
Project properties dialog too high
« on: August 02, 2007, 03:46:09 pm »
Hi,

I'm using C::B (4266) on Ubuntu 7.04, and I have the following problem: the project properties window is so high that I can't "reach" the OK button as it gets hidden below the screen edge.

Now, when I use a 15'' monitor, I can solve this by hiding the bottom gnome panel (which is also quite awkward, but I got used to it); but on my 12'' laptop I can't reach the OK button even when I hide both the bottom and the top panels. So I can't really set any project properties, which in my case means I can't use C::B at all  :(  Take look at the screenshot.

http://infinitereflections.org/files/toohigh.png

Looking at this dialog, I don't see why it has to be so large: most of the vertical space is occupied by text boxes, so maybe there's a way to shorten it a bit, or make it sizable?

I'd be gratefull for any ideas on how to go around this problem.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Project properties dialog too high
« Reply #1 on: August 02, 2007, 04:38:44 pm »
the problem is caused by the build targets tab. do you have a screen shot of that? what resolution are you using?

Offline Olivia

  • Single posting newcomer
  • *
  • Posts: 6
Re: Project properties dialog too high
« Reply #2 on: August 02, 2007, 08:59:10 pm »

Here's another screen: http://infinitereflections.org/files/targets.png

The resolution is 1200x800, but I have the same problem with 1024x768.


Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Project properties dialog too high
« Reply #3 on: August 03, 2007, 03:03:27 am »
try placing the attached zip into share/CodeBlocks of your CB installation (backup the old one) and see if it helps. I've just moved the files listbox to the right. it will probably be too wide now  :?

[attachment deleted by admin]

Offline Olivia

  • Single posting newcomer
  • *
  • Posts: 6
Re: Project properties dialog too high
« Reply #4 on: August 03, 2007, 01:07:49 pm »

It's perfect!  :D

Here's how it looks now: http://infinitereflections.org/files/good.png

Thank you very, very much.

One last question: when I download a newer version, will I be able to keep using this file you gave me? Or maybe this change in the layout will make it into the newer versions?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Project properties dialog too high
« Reply #5 on: August 03, 2007, 02:54:12 pm »
glad it worked for you.

i'll submit as a patch, but don't hold your breath waiting as the devs might delay on applying it if they prefer the current look or want to try a different solution

the only file that I changed in the zip is project_options.xrc -- provided it isn't radically changed by the devs you should be able to keep replacing this version with the default one.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5157
Re: Project properties dialog too high
« Reply #6 on: August 03, 2007, 03:06:50 pm »
I like it

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Project properties dialog too high
« Reply #7 on: August 03, 2007, 05:31:08 pm »
There is a caveat. Did you try that with a project having large number of targets?? The problem may reappear again.

Sometime back one user had posted one such project which can reproduce this problem.
Be a part of the solution, not a part of the problem.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Project properties dialog too high
« Reply #8 on: August 03, 2007, 05:56:30 pm »
biplab: you're right. one way around might be to specify a max height for the listbox of, say, 500 pixels?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Project properties dialog too high
« Reply #9 on: August 03, 2007, 06:08:20 pm »
If you notice carefully, you'll find wxGROW has been used. But wxWidgets manual says following..

Quote
... that the window will preserve it is original size, wxGROW flag (same as wxEXPAND) forces the window to grow with the sizer

It can be a problem. IMHO, they should be replaced with wxEXPAND. :)

I tried to fix this problem several times. But I couldn't find a good solution.

In the latest trial, I used wxScrolledWindow as parent to the notebook. But the dialog ended up being wide.

biplab: you're right. one way around might be to specify a max height for the listbox of, say, 500 pixels?

Yes, it can be done. But again it may restrict the view in large resolution.

May be we've to come to a compromise. :)
« Last Edit: August 03, 2007, 06:09:51 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Project properties dialog too high
« Reply #10 on: August 03, 2007, 07:17:27 pm »
Great work on this issue! :)

Offline Olivia

  • Single posting newcomer
  • *
  • Posts: 6
Re: Project properties dialog too high
« Reply #11 on: August 04, 2007, 12:22:46 am »

There is a caveat. Did you try that with a project having large number of targets?? The problem may reappear again.

I just tried it out with many entries in both "build target files" and "build targets" lists; both lists behave nicely, and display a vertical scrollbar when appropriate, while the height of the window remains unchanged. So, all is well!

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Project properties dialog too high
« Reply #12 on: August 04, 2007, 08:12:14 am »
I just tried it out with many entries in both "build target files" and "build targets" lists; both lists behave nicely, and display a vertical scrollbar when appropriate, while the height of the window remains unchanged. So, all is well!

Unfortunately it doesn't work properly with large number of targets and files. The old problem remains. :( Please see the following screenshot.

« Last Edit: August 04, 2007, 08:14:06 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Project properties dialog too high
« Reply #13 on: August 04, 2007, 05:55:42 pm »
biplab: it looks like the only way to prevent those ridiculous sizes of the list boxes is to call Fit / SetSizeHints before the listboxes are filled with data. Even if you manually SetMaxSize for individual controls, the sizers themselves expand to the desired size (which is a limitation of wxwidgets sizer implementation, i guess)

Offline klight

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: Project properties dialog too high
« Reply #14 on: August 10, 2007, 05:59:29 pm »
I'm having similar problems with the Compiler and debugger dialog on Ubuntu Fiesty.  My resolution is 1200x800.

I've found that you can maximize the dialog (right-click on the icon in the left corner of the dialog's title bar and select maximize from the menu) to make the OK/Cancel button visible on the dialog.  Choosing a desktop theme with the minimize/maximize buttons visible helps.  :?

« Last Edit: August 10, 2007, 06:56:50 pm by klight »