summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@dfupdate.se>2023-05-04 21:42:41 +0200
committerMarcus Lundblad <ml@dfupdate.se>2023-05-08 23:29:10 +0200
commit1049c818718dab09ac0dd6a5f9bdf91aad10794a (patch)
tree6f2993539bcf70554c6b74d969ef1dea164d8d93
parent0424d13dd993885586eecf7fb8a4f03c3d214216 (diff)
downloadgnome-maps-1049c818718dab09ac0dd6a5f9bdf91aad10794a.tar.gz
mainWindow: Add zoom and rotation buttons to overlay
-rw-r--r--src/mainWindow.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 163ee4e2..607c13c7 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -46,6 +46,7 @@ import * as Service from './service.js';
import {ShapeLayer} from './shapeLayer.js';
import {Sidebar} from './sidebar.js';
import * as Utils from './utils.js';
+import {ZoomAndRotateControls} from './zoomAndRotateControls.js';
const _ = gettext.gettext;
@@ -109,6 +110,13 @@ export class MainWindow extends Gtk.ApplicationWindow {
this._mapOverlay.child = this._mapView;
+ this._mapOverlay.add_overlay(
+ new ZoomAndRotateControls({ mapView: this._mapView,
+ halign: Gtk.Align.START,
+ valign: Gtk.Align.START,
+ margin_start: 6,
+ margin_top: 6 }));
+
this._mapView.gotoUserLocation(false);
this._sidebar = this._createSidebar();