Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 432:a80d190a9fc1
trying to fix fitScreen
author | Nozomi |
---|---|
date | Wed, 08 Jun 2016 21:18:38 +0900 |
parents | 7eaa95ca7e45 |
children | ff7fa81f3616 |
files | .idea/workspace.xml src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java |
diffstat | 2 files changed, 42 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/.idea/workspace.xml Wed Jun 08 20:54:07 2016 +0900 +++ b/.idea/workspace.xml Wed Jun 08 21:18:38 2016 +0900 @@ -2,14 +2,7 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="8c014d34-63b7-4e87-8d9c-e9f73c2c3803" name="Default" comment=""> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/compiler.xml" afterPath="$PROJECT_DIR$/.idea/compiler.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/encodings.xml" afterPath="$PROJECT_DIR$/.idea/encodings.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/gradle.xml" afterPath="$PROJECT_DIR$/.idea/gradle.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/vcs.xml" afterPath="$PROJECT_DIR$/.idea/vcs.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Todo.txt" afterPath="$PROJECT_DIR$/Todo.txt" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/TreeVNC.iml" afterPath="$PROJECT_DIR$/TreeVNC.iml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" afterPath="$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java" /> </list> <ignored path="TreeVNC.iws" /> @@ -83,28 +76,23 @@ <file leaf-file-name="SwingViewerWindow.java" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.39841986"> - <caret line="1018" column="0" selection-start-line="1018" selection-start-column="0" selection-end-line="1018" selection-end-column="0" /> + <state vertical-scroll-proportion="0.54131734"> + <caret line="1024" column="8" selection-start-line="1024" selection-start-column="8" selection-end-line="1024" selection-end-column="8" /> <folding> - <element signature="e#43458#43459#0" expanded="true" /> - <element signature="e#43493#43494#0" expanded="true" /> - <element signature="e#44017#44018#0" expanded="true" /> - <element signature="e#44050#44051#0" expanded="true" /> + <element signature="e#34754#35093#0" expanded="true" /> + <element signature="e#35092#35093#0" expanded="true" /> + <element signature="e#35708#36105#0" expanded="true" /> + <element signature="e#36104#36105#0" expanded="true" /> + <element signature="e#40465#40591#0" expanded="true" /> + <element signature="e#43619#43620#0" expanded="true" /> + <element signature="e#43654#43655#0" expanded="true" /> + <element signature="e#44178#44179#0" expanded="true" /> + <element signature="e#44211#44212#0" expanded="true" /> </folding> </state> </provider> </entry> </file> - <file leaf-file-name="UiSettings.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/UiSettings.java"> - <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0"> - <caret line="199" column="16" selection-start-line="199" selection-start-column="16" selection-end-line="199" selection-end-column="16" /> - <folding /> - </state> - </provider> - </entry> - </file> <file leaf-file-name="ConnectionPresenter.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/ConnectionPresenter.java"> <provider selected="true" editor-type-id="text-editor"> @@ -923,6 +911,13 @@ <option name="number" value="Default" /> <updated>1465382253216</updated> </task> + <task id="LOCAL-00001" summary="trying to fix fitScreen"> + <created>1465386847912</created> + <option name="number" value="00001" /> + <option name="project" value="LOCAL" /> + <updated>1465386847912</updated> + </task> + <option name="localTasksCounter" value="2" /> <servers /> </component> <component name="TestHistory"> @@ -965,6 +960,10 @@ <component name="VcsContentAnnotationSettings"> <option name="myLimit" value="2678400000" /> </component> + <component name="VcsManagerConfiguration"> + <MESSAGE value="trying to fix fitScreen" /> + <option name="LAST_COMMIT_MESSAGE" value="trying to fix fitScreen" /> + </component> <component name="XDebuggerManager"> <breakpoint-manager> <breakpoints> @@ -1035,7 +1034,7 @@ </entry> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/UiSettings.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.0"> + <state vertical-scroll-proportion="0.2020316"> <caret line="199" column="16" selection-start-line="199" selection-start-column="16" selection-end-line="199" selection-end-column="16" /> <folding /> </state> @@ -1043,13 +1042,18 @@ </entry> <entry file="file://$PROJECT_DIR$/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java"> <provider selected="true" editor-type-id="text-editor"> - <state vertical-scroll-proportion="0.39841986"> - <caret line="1018" column="0" selection-start-line="1018" selection-start-column="0" selection-end-line="1018" selection-end-column="0" /> + <state vertical-scroll-proportion="0.54131734"> + <caret line="1024" column="8" selection-start-line="1024" selection-start-column="8" selection-end-line="1024" selection-end-column="8" /> <folding> - <element signature="e#43458#43459#0" expanded="true" /> - <element signature="e#43493#43494#0" expanded="true" /> - <element signature="e#44017#44018#0" expanded="true" /> - <element signature="e#44050#44051#0" expanded="true" /> + <element signature="e#34754#35093#0" expanded="true" /> + <element signature="e#35092#35093#0" expanded="true" /> + <element signature="e#35708#36105#0" expanded="true" /> + <element signature="e#36104#36105#0" expanded="true" /> + <element signature="e#40465#40591#0" expanded="true" /> + <element signature="e#43619#43620#0" expanded="true" /> + <element signature="e#43654#43655#0" expanded="true" /> + <element signature="e#44178#44179#0" expanded="true" /> + <element signature="e#44211#44212#0" expanded="true" /> </folding> </state> </provider>
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Wed Jun 08 20:54:07 2016 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Wed Jun 08 21:18:38 2016 +0900 @@ -881,9 +881,11 @@ @Override public void actionPerformed(ActionEvent e) { fitScreen(); + /* if (!viewer.getRfb().isTreeManager()) { context.sendMessage(new RequestSingleDisplaySize()); } + */ } }); @@ -1014,9 +1016,13 @@ int singleWidth = viewer.getRfb().getSingleWidth() * viewer.getRfb().getRetinaScale(); int singleHeight = viewer.getRfb().getSingleHeight() * viewer.getRfb().getRetinaScale(); frame.setSize(thisScreenWidth, thisScreenHeight); - Rectangle visible = new Rectangle(thatScreenX,thatScreenY,thisScreenWidth,thisScreenHeight); - scroller.scrollRectToVisible(visible); uiSettings.fitScreen(thisScreenWidth, thisScreenHeight, singleWidth, singleHeight); + final Rectangle visible = new Rectangle(thatScreenX,thatScreenY,thisScreenWidth,thisScreenHeight); + SwingUtilities.invokeLater(new Runnable(){ + public void run() { + scroller.scrollRectToVisible(visible); + } + }); } private void sendCtrlAltDel(ProtocolContext context) {