-
Notifications
You must be signed in to change notification settings - Fork 41
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
[JComboBox] Incorrect popup location on high dpi screens. #162
Comments
Please provide a proper description of what you expect to happen and what’s happening instead. Without more context the screenshot isn’t telling me anything. Also please provide a minimal example to reproduce. |
@weisJ i can but only later and apparently this problem is relevant only for 4K monitors |
@weisJ Code: public class GUI extends JFrame {
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
LafManager.install(new SolarizedDarkTheme());
GUI frame = new GUI();
frame.setVisible(true);
});
}
public GUI() {
LafManager.setDecorationsEnabled(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(200, 300);
setLocationRelativeTo(null);
JTabbedPane tabsPane = new JTabbedPane(JTabbedPane.BOTTOM);
getContentPane().add(tabsPane, BorderLayout.EAST);
Filer filer = new Filer();
GridBagLayout gridBagLayout = (GridBagLayout) filer.getLayout();
gridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0};
tabsPane.addTab("filer", null, filer, null);
}
static class Filer extends JPanel {
public Filer() {
GridBagLayout gbl_this = new GridBagLayout();
gbl_this.columnWidths = new int[]{0, 0};
gbl_this.rowHeights = new int[]{35, 25, 162, 0};
gbl_this.columnWeights = new double[]{1.0, Double.MIN_VALUE};
gbl_this.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};
this.setLayout(gbl_this);
JComboBox<String> comboBox = new JComboBox<>();
GridBagConstraints con = new GridBagConstraints();
con.fill = GridBagConstraints.HORIZONTAL;
con.insets = new Insets(0, 0, 5, 5);
con.gridx = 15;
con.gridy = 0;
comboBox.addItem("test");
comboBox.addItem("test2");
comboBox.addItem("test3");
comboBox.addItem("test4");
comboBox.addItem("test5");
comboBox.addItem("test6");
this.add(comboBox, con);
}
}
} |
I have added the code to your comment. Please refrain from uploading code as a zip archive if it's only two files. Also I still don't know what issue you are exactly encountering. The program works fine for me (aside from the weird choice of layout) and your screenshot doesn't give me any context. |
@weisJ i do not know how to explain it |
@weisJ i can try to record a video |
What is your resolution exactly? |
What is your resolution exactly? - Display: 3840x2280 |
Now I'm just interested how big the monitor is. Usually windows recommends
Please try with Java >=9
I meant how many at the same time. |
@weisJ i can’t test this in Java 9, it causes blur in all applications |
How many monitors do you use? - 3 monitors |
Can you try using only the 4k monitor.
That's very strange and increases my suspicion that this isn't actually a darklaf issue.
|
can you try using only the 4k monitor. - in the morning I tested and so and so / result: nothing in the morning i tested setDecorations, this fixed the problem only with the decorations turned off |
Please clarify. Do enabled or disabled decorations produce the error? |
@weisJ Please clarify. Do enabled or disabled decorations produce the error? - when enabled |
Please try with only the 4k monitor connected and with Java 9 (ignore the fact that its's blurry).
What value is actually recommended to you? is it 100% (most likely it isn't) |
no changes
300% - 350% as I wrote to you, this problem only appears when @weisJ maybe problem in decorations? because as I wrote with the decorations disabled, there is no such problem I hope you can fix it for a 4k monitor |
Did you try java 9? Do you have any overridden settings for dpi scaling. It’s really important that you answer all the questions as otherwise I can’t do anything about the issue. I have a monitor with a resolution of |
@weisJ |
@weisJ this is how the GraxCode application works for me |
@weisJ |
Please answer all my questions:
As long as I can't reproduce the issue I won't be able to da anything about it as much as I'd like to. But without confirmation that it is actually directly related to darklaf and not caused by any other changes on your side I don't think I can actually do something. |
I have everything by default
I did not change anything in windows after installation, I have no problems with themes other than darklaf |
Please feel free to build darklaf locally and check if you can find the issue. My first assessment would be that the issue would be somewhere in I can't possibly offer a solution without being able to reproduce the issue. |
@weisJ |
You don’t need to know any c++ only a compiler. If you don’t have any installed currently I recommend using the Visual Studio command line tools. Some things you can try:
I won’t send you any libraries as it’s a huge effort to do “remote debugging” of this kind. |
I think I could isolate a scenario where I can reproduce the issue. Currently working on a fix. |
Please try the current repository version. |
@weisJ same |
|
Are you sure you are running an up to date version? Does the message get printed every time? |
@weisJ |
@weisJ |
@weisJ |
Thank you very much for the video.
The first step would be to try to reproduce the issue on a different machine. Do you have access to another Windows machine which you could try with your monitor? Generally you can always try the current master branch using:
|
no, but I checked in a virtual machine this problem is unlikely in the computer seems to be a problem that is only available on some computers or windows systems |
@weisJ |
@weisJ |
Could you please try the the latest revision? You'll need to re-download the latest binaries if you aren't compiling them yourself. |
@Ilolka1337 I am closing this issue and moving the topic to #172 as the paint bleeding is a separate issue. |
Screenshots

Additional Information:
Additional context
I have only 5 ComboBoxes, I switch one of them and the topic starts to shift visually
The text was updated successfully, but these errors were encountered: