[haiku-3rdparty-dev] Re: Window size becomes 'indecreasable'

  • From: "Humdinger" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "humdingerb" for DMARC)
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Mon, 2 Oct 2017 19:36:19 +0200

Hi Brian!

On 01/10/2017, brian@tycho.email <brian@tycho.email> wrote:

OK, I am on holiday so no access to Haiku now to try stuff. But it sounds
like layout issues when the text changes. For setting an explicit min window
size you could try initially creating the window with the auto size limits
flag, then after all views are added to the layout unset that flag and set
the explicit min window size to the current size.

It actually didn't require that amount of hoop jumping. See [1] :)

Also you are putting weight 10 on the size bar so when the size info string
view changes the bar size may not be allowed to shrink in size to
accommodate the new string view size. So it depends on what you want to do
when the string changes.

Right. I decided to have fixed-width string view that is wide enough
for the widest possible string. Then only the size bar needs to be
recalculated when the window is resized. I set B_FULL_UPDATE_ON_RESIZE
on the SizeBar in order for its Draw() being called on resize.

But I dunno,
usually for me it is a lot of trial and error too. I feel your pain man!

Yeah, that one took me a while... :)
Thanks for your input! Enjoy your vacation!

-- 
Regards,
Humdinger

[1] 
https://github.com/humdingerb/BurnItNow/commit/5d96bc1744f780e6f1e6891792d1287b6537b7b4

--
Did you know:
  If half the Haiku supporters at http://www.goodsearch.com
  made 10 searches a day, we could have a fulltime developer.

Other related posts: