-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2D charts should have a consistent layout when switching from HiDPI to no HiDPI #268
Comments
Relates to #249 |
Remarks
Classes working with pixelScale
Differences between jGL and Native can be found by looking at callers of Canvas.isNative() |
Classes working with pixelScale
Differences between jGL and Native can be found by looking at callers of Canvas.isNative() |
Integration tests baselines show that we now have a consistent layout among windowing toolkits, resolutions (HiDPI/not), and OS (macOS 10, macOS 11, Ubuntu, Windows 10) Exception on Windows+AWT+HiDPIdue to a known bug (#101) for which a workaround was provided. We are for now able to combine all these HiDPI layout computation with Windows fix but can not find a way to let ViewAndColorbarsLayout deal with the colorbar height in the case of Windows+AWT+HiDPI. Swing case on Windows (correct)AWT case on Windows (correct on width, incorrect on height)Possible long term fix
|
State of layout in different cases
Native hidpi
The bar of the colorbar as well as the margin are thiner with HiDPI, according to pixel scale.
Native no hidpi
EmulGL hidpi
EmulGL no hidpi
Requirements
View2DLayout_Debug
).AWTColorbarImageGenerator.getScaledBarWidth()
for a fix).2D View layout (in 2.1.0)
Colorbar layout (expected in this ticket)
Causes of the differences
EmulGLViewAndColorbarLayout
), on native, only a slice, the other one is for colorbar (ViewAndColorbarLayout
)Related TODOs
chart.getColorbar()
return anIColorbar
which includes everything needed to avoid casting toAWTColorbarLegend
everytime. Especially get/setFont get/setMarginEmulGLChartFactory
instanciate as many charts as needed (deal with theinternalCanvas
andinternalPainter
members inEmulGLPainterFactory
).AxisLaout
,View3DLayout
,View2DLayout
,ViewportLayout
,LegendLayout
,LineLegendLayout
) and renameViewAndColorbarsLayout
toViewAndColorbarsProcessing
to comply toView2DLayout
andView2DProcessing
.colorbar setMinimumSize / getMinimumSize / setShrinkColorbar / isShrinkColorbar
The text was updated successfully, but these errors were encountered: