import jalview.datamodel.SequenceI;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
+import jalview.util.Platform;
import jalview.viewmodel.ViewportRanges;
public class AlignmentPanelTest
*/
av.setIdWidth(-1); // force recalculation
d = af.alignPanel.calculateIdWidth();
- assertEquals(d.width, 166); // 4 + pixel width of "Q93Z60_ARATH/1-118"
+ assertEquals(d.width, Platform.forArch(166).forWin(172).value().intValue()); // 4 + pixel width of "Q93Z60_ARATH/1-118"
assertEquals(d.height, 12);
assertEquals(d.width, av.getIdWidth());
}
* note 4 pixels 'padding' are added to the longest seq name/annotation label
*/
Dimension d = af.alignPanel.calculateIdWidth(2000);
- assertEquals(d.width, 166); // 4 + pixel width of "Q93Z60_ARATH/1-118"
+ assertEquals(d.width, Platform.forArch(166).forWin(172).value().intValue()); // 4 + pixel width of "Q93Z60_ARATH/1-118"
assertEquals(d.height, 12); // fixed value (not used?)
assertEquals(av.getIdWidth(), 18); // not changed by this method
.findSequenceMatch("Q93Z60_ARATH")[0];
seq.setName(seq.getName() + "MMMMM");
d = af.alignPanel.calculateIdWidth(2000);
- assertEquals(d.width, 211); // 4 + pixel width of "Q93Z60_ARATHMMMMM/1-118"
+ assertEquals(d.width, Platform.forArch(211).forWin(219).value().intValue()); // 4 + pixel width of "Q93Z60_ARATHMMMMM/1-118"
assertEquals(d.height, 12);
assertEquals(av.getIdWidth(), 18); // unchanged
*/
int w = af.alignPanel.getVisibleIdWidth(true);
assertEquals(w, af.alignPanel.getIdPanel().getWidth());
- assertEquals(w, 115);
+ assertEquals(w, Platform.forArch(115).forWin(112).forMac(115)
+ .forLinux(114).value().intValue());
/*
* width for offscreen rendering is the same
* preference for auto id width overrides fixed width
*/
Cache.setProperty("FIGURE_AUTOIDWIDTH", Boolean.TRUE.toString());
- assertEquals(115, af.alignPanel.getVisibleIdWidth(false));
+ assertEquals(af.alignPanel.getVisibleIdWidth(false),
+ Platform.forArch(115).forWin(106).forMac(115).forLinux(114)
+ .value().intValue());
}
@Test(groups = "Functional")