Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-22 Thread Morten Sorvig
> On 16 Nov 2016, at 17:22, Niccolò Belli wrote: > > Hi Morten, > I'm sorry, I missed your reply. > >> RoundPreferFloor Round up for .75 and higher >> RoundPreferFloor is the new default. Do you think this is sufficient? > > qFloor would help for my monitor, of

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-16 Thread Christoph Feck
On 16.11.2016 17:22, Niccolò Belli wrote: Hi Morten, I'm sorry, I missed your reply. RoundPreferFloor Round up for .75 and higher RoundPreferFloor is the new default. Do you think this is sufficient? qFloor would help for my monitor, of course. Unfortunately the default (RoundPreferFloor)

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-16 Thread Niccolò Belli
Hi Morten, I'm sorry, I missed your reply. RoundPreferFloor Round up for .75 and higher RoundPreferFloor is the new default. Do you think this is sufficient? qFloor would help for my monitor, of course. Unfortunately the default (RoundPreferFloor) wouldn't be enough, because my monitor

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-10 Thread Morten Sorvig
> On 8 Nov 2016, at 15:57, Niccolò Belli wrote: > > Hi, > My laptop's monitor is a 13" with a 16:9 aspect ratio and a 3200x1800 > resolution. As you can see[1] the EDID[2] is perfectly correct. > QT computes the scaling factor using a formula like this: >

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-10 Thread Morten Sorvig
> On 9 Nov 2016, at 23:25, Allan Sandfeld Jensen wrote: > > > Since most of the common configuration of HiDPI screens are following Mac > standards, they have been designed to work at 2x scaling with 72DPI. We can > not ignore all the Apple style screens out there like 4k

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-10 Thread Morten Sorvig
> On 9 Nov 2016, at 19:44, Niccolò Belli wrote: > >> On martedì 8 novembre 2016 23:34:48 CET, Allan Sandfeld Jensen wrote: >>> We have a two factor scaling system. We also scale by DPI. 144/2 == 72 for >>> instance, which happens to be the standard on Macs. Therefore

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-09 Thread Niccolò Belli
On mercoledì 9 novembre 2016 23:25:41 CET, Allan Sandfeld Jensen wrote: GTK has only just recently implemented HiDPI, much much later than Qt. What makes you think it is "working well for them"? I think it's working well just because I didn't hear as many complaints as QT's, but may be as

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-09 Thread Thiago Macieira
On quarta-feira, 9 de novembro de 2016 19:40:14 CST Niccolò Belli wrote: > > We have plenty of environment variables already. I personally set > > QT_SCREEN_SCALE_FACTORS to 2 on my 13" 3200x1800 display (font DPI is > > 216). > AFAIK QT_SCREEN_SCALE_FACTORS doesn't scale fonts, so you will still

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-09 Thread Allan Sandfeld Jensen
On Wednesday 09 November 2016, Niccolò Belli wrote: > On martedì 8 novembre 2016 23:02:04 CET, Thiago Macieira wrote: > > Agreed we need to adjust the formula. I'm not sure a full round > > down (i.e., an > > integer division) is what we want. Another option is > > > > qRound(dpi / 96.0 -

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-09 Thread Niccolò Belli
On martedì 8 novembre 2016 23:34:48 CET, Allan Sandfeld Jensen wrote: We have a two factor scaling system. We also scale by DPI. 144/2 == 72 for instance, which happens to be the standard on Macs. Therefore 144DPI become a normal 2x scaling of standard 72 Mac DPI. And having 2x with smaller

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-09 Thread Niccolò Belli
On martedì 8 novembre 2016 23:02:04 CET, Thiago Macieira wrote: Agreed we need to adjust the formula. I'm not sure a full round down (i.e., an integer division) is what we want. Another option is qRound(dpi / 96.0 - 0.75); That would make: DPI < 1681x DPI < 264

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-09 Thread Niccolò Belli
(resend for the mailing list) On martedì 8 novembre 2016 23:34:48 CET, Allan Sandfeld Jensen wrote: On Tuesday 08 November 2016, Niccolò Belli wrote: 1) Always round down. With your current formula a 145ppi screen gets scaled by a 2x factor, while every other toolkit (GTK3 for example[3])

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-08 Thread Allan Sandfeld Jensen
On Tuesday 08 November 2016, Niccolò Belli wrote: > 1) Always round down. With your current formula a 145ppi screen gets scaled > by a 2x factor, while every other toolkit (GTK3 for example[3]) starts > scaling at 192ppi. This is also what people expect and it would return the > correct 2x scaling

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-08 Thread Thiago Macieira
Em terça-feira, 8 de novembro de 2016, às 15:57:40 CST, Niccolò Belli escreveu: > 1) Always round down. With your current formula a 145ppi screen gets scaled > by a 2x factor, while every other toolkit (GTK3 for example[3]) starts > scaling at 192ppi. This is also what people expect and it would

Re: [Development] [HiDPI] Rethinking the scaling algorithm

2016-11-08 Thread Niccolò Belli
On martedì 8 novembre 2016 15:57:40 CET, Niccolò Belli wrote: [2]https://bpaste.net/show/e2f39fad5f5e Wrong link for the EDID, this is the correct one: https://bpaste.net/show/0e34f12832d9 ___ Development mailing list Development@qt-project.org

[Development] [HiDPI] Rethinking the scaling algorithm

2016-11-08 Thread Niccolò Belli
Hi, My laptop's monitor is a 13" with a 16:9 aspect ratio and a 3200x1800 resolution. As you can see[1] the EDID[2] is perfectly correct. QT computes the scaling factor using a formula like this: scaling_factor=qRound(yourDpi/96) This is far from ideal in my opinion, because if we want to scale