- GtkAdjustment* adj = GTK_ADJUSTMENT( gtk_adjustment_new( 0, -1000, 1000, 1, 1, 0 ) ); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
- g_signal_connect( G_OBJECT( adj ), "value_changed", G_CALLBACK( OnSpinChanged ), entry );
- g_object_set_data( G_OBJECT( window ), "rotate_adj", adj );
-
- GtkSpinButton* spin = GTK_SPIN_BUTTON( gtk_spin_button_new( adj, 1, 0 ) );
- gtk_widget_show( GTK_WIDGET( spin ) );
- gtk_table_attach( table, GTK_WIDGET( spin ), 1, 2, 4, 5,
- (GtkAttachOptions)( 0 ),
- (GtkAttachOptions)( 0 ), 0, 0 );
- gtk_widget_set_usize( GTK_WIDGET( spin ), 10, -2 );
- GTK_WIDGET_UNSET_FLAGS( spin, GTK_CAN_FOCUS );
+ auto adj = ui::Adjustment( 0, -1000, 1000, 1, 1, 0 ); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
+ adj.connect( "value_changed", G_CALLBACK( OnSpinChanged ), entry );
+ g_object_set_data( G_OBJECT( window ), "rotate_adj", (gpointer) adj );
+
+ auto spin = ui::SpinButton( adj, 1, 0 );
+ spin.show();
+ table.attach(spin, {1, 2, 4, 5}, {0, 0});
+ gtk_widget_set_size_request( spin , 10, -1 );
+ gtk_widget_set_can_focus( spin, false );