Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9d1024d

Browse files
Merge pull request#15 from integralbyte/main
Fix: resolve blue screen issue on Mac devices and adjust message pane…
2 parents4687bc6 +56cc367 commit9d1024d

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

‎mars/Globals.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class Globals
7474
/* The GUI being used (if any) with this simulator. */
7575
staticVenusUIgui =null;
7676
/** The current MARS version number. Can't wait for "initialize()" call to get it. */
77-
publicstaticfinalStringversion ="4.5";
77+
publicstaticfinalStringversion ="4.6";
7878
/** List of accepted file extensions for MIPS assembly source files. */
7979
publicstaticfinalArrayListfileExtensions =getFileExtensions();
8080
/** Maximum length of scrolled message window (MARS Messages and Run I/O) */

‎mars/venus/ExecutePane.java‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class ExecutePane extends JDesktopPane {
4848
privateNumberDisplayBaseChooservalueDisplayBase;
4949
privateNumberDisplayBaseChooseraddressDisplayBase;
5050
privatebooleanlabelWindowVisible;
51+
privatebooleanlayoutPending;
5152

5253
/**
5354
* initialize the Execute pane with major components
@@ -76,6 +77,7 @@ public ExecutePane(VenusUI mainUI, RegistersWindow regs, Coprocessor1Window cop1
7677
dataSegment =newDataSegmentWindow(choosers);
7778
labelValues =newLabelsWindow();
7879
labelWindowVisible =Globals.getSettings().getLabelWindowVisibility();
80+
layoutPending =false;
7981
this.add(textSegment);// these 3 LOC moved up. DPS 3-Sept-2014
8082
this.add(dataSegment);
8183
this.add(labelValues);
@@ -105,6 +107,19 @@ public void setWindowBounds() {
105107

106108
intfullWidth =this.getSize().width -this.getInsets().left -this.getInsets().right;
107109
intfullHeight =this.getSize().height -this.getInsets().top -this.getInsets().bottom;
110+
if (fullWidth <=0 ||fullHeight <=0) {
111+
if (!layoutPending) {
112+
layoutPending =true;
113+
SwingUtilities.invokeLater(
114+
newRunnable() {
115+
publicvoidrun() {
116+
layoutPending =false;
117+
setWindowBounds();
118+
}
119+
});
120+
}
121+
return;
122+
}
108123
inthalfHeight =fullHeight/2;
109124
DimensiontextDim =newDimension((int)(fullWidth*.75),halfHeight);
110125
DimensiondataDim =newDimension((int)(fullWidth),halfHeight);
@@ -258,4 +273,4 @@ public void numberDisplayBaseChanged(NumberDisplayBaseChooser chooser) {
258273
}
259274
}
260275

261-
}
276+
}

‎mars/venus/VenusUI.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ public VenusUI(String s) {
118118
doublescreenHeight =Toolkit.getDefaultToolkit().getScreenSize().getHeight();
119119
// basically give up some screen space if running at 800 x 600
120120
doublemessageWidthPct = (screenWidth<1000.0)?0.67 :0.73;
121-
doublemessageHeightPct =(screenWidth<1000.0)?0.12 :0.15;
121+
doublemessageHeightPct =0.25;
122122
doublemainWidthPct = (screenWidth<1000.0)?0.67 :0.73;
123-
doublemainHeightPct = (screenWidth<1000.0)?0.60 :0.65;
123+
doublemainHeightPct = (screenWidth<1000.0)?0.60 :0.68;
124124
doubleregistersWidthPct = (screenWidth<1000.0)?0.18 :0.22;
125125
doubleregistersHeightPct = (screenWidth<1000.0)?0.72 :0.80;
126126

@@ -170,9 +170,12 @@ public VenusUI(String s) {
170170
mainPane.setPreferredSize(mainPanePreferredSize);
171171
messagesPane=newMessagesPane();
172172
messagesPane.setPreferredSize(messagesPanePreferredSize);
173+
messagesPane.setMinimumSize(newDimension(0,120));
173174
splitter=newJSplitPane(JSplitPane.VERTICAL_SPLIT,mainPane,messagesPane);
174175
splitter.setOneTouchExpandable(true);
176+
splitter.setResizeWeight(0.75);
175177
splitter.resetToPreferredSizes();
178+
splitter.setDividerLocation(1.0 -messageHeightPct);
176179
horizonSplitter =newJSplitPane(JSplitPane.HORIZONTAL_SPLIT,splitter,registersPane);
177180
horizonSplitter.setOneTouchExpandable(true);
178181
horizonSplitter.resetToPreferredSizes();
@@ -1171,4 +1174,4 @@ private void setupPopupMenu() {
11711174

11721175

11731176

1174-
}
1177+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp