From 4a185b007b3ee78408cae55327441d867954c200 Mon Sep 17 00:00:00 2001 From: george82 Date: Mon, 12 Mar 2007 14:26:33 +0000 Subject: [PATCH] Fixed the small defect with refreshing the toolbar buttons (now always enable actual size button when vncviewer works in the autoscaling mode). git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2235 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- win/vncviewer/DesktopWindow.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/vncviewer/DesktopWindow.cxx b/win/vncviewer/DesktopWindow.cxx index c7c6e61c..b0bebaf1 100644 --- a/win/vncviewer/DesktopWindow.cxx +++ b/win/vncviewer/DesktopWindow.cxx @@ -324,8 +324,6 @@ void DesktopWindow::setShowToolbar(bool st) void DesktopWindow::refreshToolbarButtons() { int scale = getDesktopScale(); - if (scale == 100) tb.enableButton(ID_ACTUAL_SIZE, false); - else tb.enableButton(ID_ACTUAL_SIZE, true); if (scale <= 10) { tb.enableButton(ID_ZOOM_IN, true); tb.enableButton(ID_ZOOM_OUT, false); @@ -336,6 +334,8 @@ void DesktopWindow::refreshToolbarButtons() { tb.enableButton(ID_ZOOM_IN, true); tb.enableButton(ID_ZOOM_OUT, true); } + if (buffer->isScaling() || isAutoScaling()) tb.enableButton(ID_ACTUAL_SIZE, true); + else tb.enableButton(ID_ACTUAL_SIZE, false); if (isAutoScaling()) tb.pressButton(ID_AUTO_SIZE, true); else tb.pressButton(ID_AUTO_SIZE, false); } -- 2.39.5