mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
all: make unit.Converter concrete and rename to Metric
An interface for scaling dp and sp is overkill, at least for all current uses. Make it a concrete struct type, and rename it to the shorter and more precise Metric. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -119,9 +119,9 @@ func (w *window) draw(sync bool) {
|
||||
Bottom: unit.Px(float32(params.bottom)),
|
||||
Left: unit.Px(float32(params.left)),
|
||||
},
|
||||
Config: &config{
|
||||
pxPerDp: float32(params.dpi) * inchPrDp,
|
||||
pxPerSp: float32(params.sdpi) * inchPrDp,
|
||||
Metric: unit.Metric{
|
||||
PxPerDp: float32(params.dpi) * inchPrDp,
|
||||
PxPerSp: float32(params.sdpi) * inchPrDp,
|
||||
},
|
||||
},
|
||||
Sync: sync,
|
||||
|
||||
Reference in New Issue
Block a user