if (as) fitBufferToWindow();
}
-void DesktopWindow::setDesktopScale(int scale) {
- buffer->setScale(scale);
+void DesktopWindow::setDesktopScaleRatio(double scale_ratio) {
+ buffer->setScaleRatio(scale_ratio);
InvalidateRect(frameHandle, 0, FALSE);
calculateScrollBars();
if (isToolbarEnabled()) refreshToolbarButtons();
} else {
scale_ratio = double(client_size.width()) / buffer->getSrcWidth();
}
- buffer->setScaleRatio(scale_ratio);
- if (repaint) InvalidateRect(frameHandle, 0, TRUE);
- if (isToolbarEnabled()) refreshToolbarButtons();
+ setDesktopScaleRatio(scale_ratio);
}
void
void setColour(int i, int r, int g, int b) {buffer->setColour(i, r, g, b);}
void setAutoScaling(bool as);
bool isAutoScaling() const { return autoScaling; }
- void setDesktopScale(int scale);
+ void setDesktopScaleRatio(double scale_ratio);
+ void setDesktopScale(int scale) { setDesktopScaleRatio(double(scale)/100); }
int getDesktopScale() const { return buffer->getScale(); }
void fitBufferToWindow(bool repaint = true);