On Friday 28 November 2014 12:52:44 Christoph Feck wrote: > > > > Q_PROPERTY(QFont font > > > > > > When I want to compute pixel sizes for the requested font, how > > > do I get the correct QPaintDevice needed for the QFontMetrics? > > > Otherwise, please provide a QFontMetrics (see QStyleOption). > > > > sorry, but I don't get what you want. There is a ctor in > > QFontMetrics not needing a QPaintDevice. > > If I use the default constructor, no information about which screen to > use for the DPI (point->pixel) conversion is passed, and it will > probably use the default screen, which is fine for applications (which > most probably never span multiple screens), but is fatal for KWin, > which is supposed to provide readable decorations on multiple screens.
all right: implemented in kdecoration (58471e9). Not yet added to KWin yet (we are still lacking proper high-dpi in KWin anyway). I hope you are also happy with QFontMetricsF instead of QFontMetrics. Cheers Martin
signature.asc
Description: This is a digitally signed message part.