Skip to content

Commit 5cec750

Browse files
committed
Set SCALE_IMAGE_EXPORT default to true for Windows/Mac, false for Linux
We shouldn't set the default from the current device scale when Archi is launched because it can change if a different monitor is selected on Windows. You can start the app at 100% display and this preference defaults to false. Then you switch to a 200% display and that preference is still false. Generally, this should be true for Windows and Mac and false for Linux.
1 parent 980757e commit 5cec750

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

com.archimatetool.editor/src/com/archimatetool/editor/preferences/PreferenceInitializer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import com.archimatetool.editor.ArchiPlugin;
1212
import com.archimatetool.editor.diagram.figures.connections.IDiagramConnectionFigure;
13-
import com.archimatetool.editor.ui.ImageFactory;
1413
import com.archimatetool.editor.utils.PlatformUtils;
1514
import com.archimatetool.model.IDiagramModelObject;
1615
import com.archimatetool.model.ILegendOptions;
@@ -136,8 +135,8 @@ public void initializeDefaultPreferences() {
136135
store.setDefault(USE_LABEL_EXPRESSIONS_IN_ANALYSIS_TABLE, true);
137136

138137
store.setDefault(ADD_DOCUMENTATION_NOTE_ON_RELATION_CHANGE, false);
139-
// Windows hi-res and Mac Retina use display scaling, Linux is 100
140-
store.setDefault(SCALE_IMAGE_EXPORT, PlatformUtils.isLinux() ? false : ImageFactory.getDeviceZoom() > 100);
138+
// Windows and Mac use display scaling, Linux is 100% scaling
139+
store.setDefault(SCALE_IMAGE_EXPORT, PlatformUtils.isLinux() ? false : true);
141140

142141
// Animation
143142
store.setDefault(ANIMATE_VIEW, false);

com.archimatetool.editor/src/com/archimatetool/editor/ui/ImageFactory.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ public static int getDeviceZoom() {
5757
/**
5858
* @return The zoom level for creating images.
5959
* On Linux scaleImages defaults to false and this should be 100%
60-
* On Mac use the device zoom
61-
* On Windows use the device zoom
60+
* On Mac/Windows use the device zoom
6261
*/
6362
public static int getImageDeviceZoom() {
6463
boolean scaleImages = ArchiPlugin.getInstance().getPreferenceStore().getBoolean(IPreferenceConstants.SCALE_IMAGE_EXPORT);

com.archimatetool.help/help/Text/prefs_general.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h3>Other</h3>
6262
<br/>
6363

6464
<p><strong>Export images at native display scale</strong><br/>
65-
When this is selected, images are exported and copied to the clipboard at the native display scaling. This is set on by default for Windows operating systems when the display scaling is greater than 100%, and on Mac Retina devices. This is so that the exported image quality is not compromised since it is not possible to set a higher DPI in the image. This setting is usually not needed on Linux displays.</p>
65+
When this is selected, images are exported and copied to the clipboard at the native display scaling. This is on by default for Windows and Mac and off for Linux. This ensures that the exported image quality is better at higher display scales. If this option is not selected images are exported at 100% scaling. This setting is usually not needed on Linux displays.</p>
6666

6767
<p>If the resulting image needs to be at its logical size you could edit it in an image editor and set the DPI to double its value. For example, on Mac change the DPI from to 72 to 144.</p>
6868
<br/>

0 commit comments

Comments
 (0)