Skip to content
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

Einstellungs-Menü überall verschoben #4474

Open
Nirus2000 opened this issue Jan 15, 2025 · 4 comments
Open

Einstellungs-Menü überall verschoben #4474

Nirus2000 opened this issue Jan 15, 2025 · 4 comments
Assignees

Comments

@Nirus2000
Copy link
Member

Nirus2000 commented Jan 15, 2025

Sobald man, egal in welchem Menü oder Reiter, auf das Zahnrad klickt, wird das Content-Menü an falsche Stelle gesetzt.

grafik

grafik

Version: 0.73.0 (Dezember 2024)
Platform: win32, x86_64
Windows 10
Java: 21.0.5+11-LTS, Azul Systems, Inc.

@buchen
Copy link
Member

buchen commented Jan 17, 2025

Seems to be a Windows problem :-(

Do you have a scaling factor configured?

@Nirus2000
Copy link
Member Author

Nirus2000 commented Jan 17, 2025

Yep... good idea.

-Dswt.autoScale=auto
-Dswt.autoScale=quarter <-- Problem
-Dswt.autoScale.method=nearest

with
-Dswt.autoScale=half <-- same Problem
-Dswt.autoScale=double <-- same Problem


Vielleicht können wir ja die Icon's, in der CSS skalieren?

int dpi = display.getDPI().x; // Ermittelt die DPI des Displays
String iconPath = dpi > 120 ? "[email protected]" : "icon.png"; // Wähle passendes Icon
Image image = new Image(display, iconPath);

ImageData originalData = originalImage.getImageData();
ImageData scaledData = originalData.scaledTo(newWidth, newHeight);
Image scaledImage = new Image(display, scaledData);

@buchen
Copy link
Member

buchen commented Jan 17, 2025

One by one...

The drop down menu is positioned here:

https://github.com/portfolio-performance/portfolio/blob/master/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/util/DropDown.java#L190-L200

Somehow this must take the scaling factor into account (although I was hoping that the SWT framework does this).

Is this a new problem introduced with 0.73.0 and that SWT version? Or does it also happen with older SWT versions?

@Nirus2000
Copy link
Member Author

Oh. Sorry,
I have noticed the problem with the dropdown menu since version 0.73.0. This was not the case before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants