Skip to content

Commit 7a7ba7a

Browse files
authored
Update MainWindow.vala
1 parent d867e2c commit 7a7ba7a

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

src/MainWindow.vala

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,32 +235,37 @@ namespace jorts {
235235
}
236236

237237

238-
239-
240238
public void reset_zoom() {
241239
if (this.zoom != 100) {
242-
remove_css_class (this.zoom.to_string());
240+
this.remove_css_class (this.zoom.to_string());
243241
this.zoom = 100;
244-
add_css_class (this.zoom.to_string());
242+
this.add_css_class (this.zoom.to_string());
245243
}
246244
}
247245

248246
public void zoom_in() {
249247
if ((this.zoom + 25) <= this.max_zoom) {
250-
remove_css_class (this.zoom.to_string());
248+
this.remove_css_class (this.zoom.to_string());
251249
this.zoom = this.zoom + 25;
252-
add_css_class (this.zoom.to_string());
250+
this.add_css_class (this.zoom.to_string());
253251
}
254252
}
255253

256254
public void zoom_out() {
257255
if ((this.zoom - 25) >= this.min_zoom) {
258-
remove_css_class (this.zoom.to_string());
256+
this.remove_css_class (this.zoom.to_string());
259257
this.zoom = this.zoom - 25;
260-
add_css_class (this.zoom.to_string());
258+
this.add_css_class (this.zoom.to_string());
261259
}
262260
}
263261

262+
public void set_zoom(int zoom) {
263+
this.remove_css_class (this.zoom.to_string());
264+
this.zoom = zoom;
265+
this.add_css_class (this.zoom.to_string());
266+
}
267+
268+
264269

265270
}
266271
}

0 commit comments

Comments
 (0)