sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #21708
[Bug 1220575] Re: [1.0.1] Linux: Matching preview not working
uups, now we worked in parallel ;-)
In my opinion the problem was, that the JSlider control does not have a
PreferredSize before being packed into the layout, which only seems to
be a problem in Linux
So I added the following in PatternSimilaritySlider::init()
private void init() {
showValue(lblVal, curVal);
setPreferredSize(new Dimension(250, 54));
}
In the layout part of PatternPaneScreenshot I simplified the layout this
way
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
c.gridwidth = GridBagConstraints.REMAINDER;
pane.add(btnSimilar, c);
pane.add(sldSimilar, c);
which makes this ugly stuff look a bit better.
So I would really appreciate, if you could test my version as well (not
urgent though).
BTW: the update of the formula is correct. The problem is simply the width value returned at the beginning of paintComponent:
in your case it seems to be the sliders minimum size of 38 (left and right margin of 13 and the knob size of 12), which reveals, that the formula is wrong.
On Mac and Windows, I get a width of around 200, so the max calculated score is 187/174 = 1,07, which does not lead to the problem.
Many thanks for your efforts and contribution.
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1220575
Title:
[1.0.1] Linux: Matching preview not working
Status in Sikuli:
In Progress
Bug description:
This is a Linux only issue (java version "1.7.0_25")
Open IDE editor, click a image saved before. Click "Matching
Preview", it will not work. You can got error message from console:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color parameter outside of expected range: Alpha
at java.awt.Color.testColorValueRange(Unknown Source)
at java.awt.Color.<init>(Unknown Source)
at org.sikuli.ide.PatternSimilaritySlider.getScoreColor(PatternSimilaritySlider.java:59)
at org.sikuli.ide.PatternSimilaritySlider.paintComponent(PatternSimilaritySlider.java:37)
at javax.swing.JComponent.paint(Unknown Source)
... more
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1220575/+subscriptions
References