GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Aug 21, 2014 12:07 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GTK positioning bug?
PostPosted: Wed Feb 27, 2013 4:04 pm 
Offline
Familiar Face

Joined: Tue Oct 23, 2012 8:13 am
Posts: 5
I am trying to port XBoard to GTK, and I encountered some very weird GTK behavior (on Ubunto 10.04) concerning the automatic positioning of a drawing-area widget inside its container:

XBoard always draws the chess-board (with a fixed size) in the upper-left corner of the drawing-area widget, so I can see where that is. When I resize the window by hand to make it wider, but vertically it is an exact fit, the board is centered horizontally (equal left ad right blank margins next to it). When there is an exact horizontal fit, and I make the window higher, it centers it vertically. So far so good; apparently the drawing-area widget is centered in the vbox.

But now starts the weirdness:

When the window is of exactly the right width, but too high, so that there are equal blank top and bottom margins above and below the board, and I start to make the window wider, the chess board remains touching the left window edge, but moves up. It continues moving up until it reaches the upper-right corner. If I continue to make the window wider, it then turns the corner, and starts moving horizontally (touching the upper edge of the space available for it).

It seems like what is intended to be added to the left margin is in fact subtracted from the top margin, and vice versa. Is this a known GTK bug? If so, what is the work-around?

(For those who want to see it with their own eyes: this occurs in the secondary board window of XBoard 4.7.0, which appears when you observe two games on FICS simultaneously.)

Image
Widening the window moves the board right, heigtening it moves it left
until it hits the edge, then down.


Top
 Profile  
 
 Post subject: Re: GTK positioning bug?
PostPosted: Sun Mar 03, 2013 6:25 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
Hi,

As far as I know this is not a known bug. With out knowing your code it could be a usage error in your code that causes the problem.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group