xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] Fwd: 4.9.0 what's new


From: Joshua Pettus
Subject: Re: [XBoard-devel] Fwd: 4.9.0 what's new
Date: Sun, 3 Apr 2016 15:07:08 -0400

> On Apr 3, 2016, at 11:57 AM, H.G. Muller <address@hidden> wrote:
> 
> 
> 
> Op 4/3/2016 om 5:32 PM schreef Joshua Pettus:
>> Regarding adjusting for interactive board sizing, I don’t think you need to 
>> do anything. It looks like it’s working right now! What is I think was 
>> important was that the font loaded correctly at the initial board size. From 
>> what I’m seeing, after that you can resize the board to your heart’s 
>> content. It’s not going to unload the font for another one. Just as if you 
>> set the font in the font dialog box. Then when we resize the board, we don’t 
>> suddenly loose that change. 
> True, but for the clock font it would actually be desirable that it adapts.

TBH,  I’m starting to question whether or not that actually is desirable (Even 
though it’s the way winboard works) People want the clock to be big enough to 
read and see who’s turn is at a glance.  Any bigger, and it’s just taking up 
space that really would be better used by the chess board, and any smaller it 
is illegible.  After using a fixed size clock for a while, I’m starting to 
prefer it. I feel the board can be whatever size, but the clock is fine fixed.



> The main problem, however, is that changing the clock font even without 
> resize breaks the window sizing, so that part of the board will be blank or 
> clipped. This is caused by the method I use for determining square size from 
> window size: I start up XBoard with a 1x1 board, and after pop up of the 
> window read the size of the outer window. That tells me how much height the 
> menu bar + clocks + message/buttons need. And then I assume this will be 
> constant during the session, adding it to the board height to know how much 
> total window size I must request to tightly fit around the board. If the 
> clock font changes, this vertical margin should change, but I don't know by 
> how much.
> 
> I guess I could read out the height of the clock widget before and after the 
> font change, to see how much the 'vertical margin' has to change. (And 
> similarly for the message window.)
> 
> Once this works adapting the font during resize would not be so difficult. 
> First calculate the new square size assuming no font change. Then look up 
> what fonts belong to it, and change the clock and message font to those. If 
> the clock height decreased by that, you are done. If it increased recalculate 
> how much the square size should be with the increased clock height, look up 
> what font belongs to that (which would normally be smaller, belonging to 
> smaller square size), and use those.


All this seems related to Adrian’s  i3wm problem.   Maybe there is a way to 
make the board drawing more robust and kill two birds with one stone?

Josh


reply via email to

[Prev in Thread] Current Thread [Next in Thread]