View Single Post
Old 07-26-2022, 01:43 AM   #69
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 867
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Deobulakenyo View Post
Thanks for the info. so this means that the patches does not affect the clock position.
Yeah, I wouldn't expect it to.

Time for a bit of technobabble:

The header and footer are a widget that uses a horizontal box layout manager (QHBoxLayout). This means that when you add widgets, Qt will add them next to each other. The default header/footer has single child widget (the caption), which stretches to fill it's parent. NickelClock adds two more widgets to the header/footer, one before the caption, one after. The two widgets are one of time, battery or spacer.

You can use something called a stretch factor to determine how big widgets can be relative to their siblings. In this case, the NickelClock widgets have a stretch factor set the same for each widget, and smaller than the caption stretch factor. This means that the caption should expand to fill the available space, and the two other widgets should be the same size to keep the caption centred.

The only other thing to worry about is setting margins/padding/font size (which in many ways is the hard bit...).
sherman is offline   Reply With Quote