]> source.dussan.org Git - tigervnc.git/commitdiff
Fixed the small defect with refreshing the toolbar buttons (now always enable actual...
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 12 Mar 2007 14:26:33 +0000 (14:26 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 12 Mar 2007 14:26:33 +0000 (14:26 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2235 3789f03b-4d11-0410-bbf8-ca57d06f2519

win/vncviewer/DesktopWindow.cxx

index c7c6e61c12d27fcdd74adff2b379e3fc6c516e40..b0bebaf1e772be3910e3de34cc87a2d38ce28611 100644 (file)
@@ -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);
 }