feat(render): logical style metrics with a UI scale, so chrome has a consistent physical size
This commit is contained in:
1 parent
1f03631e98
commit
7500fc90d2
21 files changed
+708
-82
No files matched your search
@@ -421,9 +421,11 @@ gboolean on_exit_timer(gpointer user_data) {
|
||||
const plot::Rect viewport = demo.area->device_viewport();
|
||||
|
||||
// The evidence that the layout was *recomputed and not scaled*: the y label
|
||||
// strip is a number of *font pixels*, so it stays the same size while the axes takes
|
||||
// the rest of the new allocation. Two things are checked, and neither is "the
|
||||
// strip is the same number":
|
||||
// strip is measured from the labels' font metrics -- a logical size, converted to
|
||||
// device pixels at *this* display's scale (see `Style::ui_scale`) -- so at a
|
||||
// constant scale it stays the same size while the axes takes the rest of the new
|
||||
// allocation. Two things are checked, and neither is "the strip is the same
|
||||
// number":
|
||||
//
|
||||
// * the axes and its strips tile the *current* viewport exactly -- a layout
|
||||
// left over from the old geometry would still tile the old one;
|
||||
|
||||
Reference in new issue
Block a user