Skip to content

Commit ed4cd67

Browse files
authored
Merge branch 'main' into Working-branch
2 parents a0b536b + 1928db6 commit ed4cd67

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

src/Objects/NoteData.vala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ public class Jorts.NoteData : Object {
1414

1515
// Will determine properties (or lack thereof) for any new note
1616
public static Jorts.Themes latest_theme = Jorts.Constants.DEFAULT_THEME;
17-
public static uint8? latest_zoom = Jorts.Constants.DEFAULT_ZOOM;
17+
public static uint16? latest_zoom = Jorts.Constants.DEFAULT_ZOOM;
1818
public static bool latest_mono = Jorts.Constants.DEFAULT_MONO;
1919

2020
public string title;
2121
public Jorts.Themes theme;
2222
public string content;
2323
public bool monospace;
24-
public uint8 zoom;
24+
public uint16 zoom;
2525
public int width;
2626
public int height;
2727

@@ -30,7 +30,7 @@ public class Jorts.NoteData : Object {
3030
* Convert into a Json.Object()
3131
*/
3232
public NoteData (string? title = null, Jorts.Themes? theme = null, string? content = null,
33-
bool? monospace = null, uint8? zoom = null, int? width = null, int? height = null)
33+
bool? monospace = null, uint16? zoom = null, int? width = null, int? height = null)
3434
{
3535
// We assign defaults in case theres args missing
3636
this.title = title ?? Jorts.Utils.random_title ();
@@ -52,7 +52,7 @@ public class Jorts.NoteData : Object {
5252
theme = Jorts.Themes.from_string (themestring);
5353
content = node.get_string_member_with_default ("content","");
5454
monospace = node.get_boolean_member_with_default ("monospace",Jorts.Constants.DEFAULT_MONO);
55-
zoom = (uint8)node.get_int_member_with_default ("zoom",Jorts.Constants.DEFAULT_ZOOM);
55+
zoom = (uint16)node.get_int_member_with_default ("zoom",Jorts.Constants.DEFAULT_ZOOM);
5656

5757
// Make sure the values are nothing crazy
5858
if (zoom < Jorts.Constants.ZOOM_MIN) { zoom = Jorts.Constants.ZOOM_MIN;}

src/Objects/Zoom.vala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public enum Jorts.Zoom {
3030
/**
3131
* Returns an Int representation we can use to display and store the value
3232
*/
33-
public uint8 to_int () {
33+
public uint16 to_int () {
3434
switch (this) {
3535
case ANTSIZED: return 20;
3636
case MUCHSMALLER: return 40;
@@ -55,7 +55,7 @@ public enum Jorts.Zoom {
5555
/**
5656
* We cannot save Enums in JSON, so this recovers the enum from stored int
5757
*/
58-
public static Zoom from_int (uint8 wtf_is_this) {
58+
public static Zoom from_int (uint16 wtf_is_this) {
5959
switch (wtf_is_this) {
6060
case 20: return ANTSIZED;
6161
case 40: return MUCHSMALLER;
@@ -105,7 +105,7 @@ public enum Jorts.Zoom {
105105
/**
106106
* We have to scale some UI elements according to zoom
107107
*/
108-
public uint8 to_size () {
108+
public uint16 to_size () {
109109
switch (this) {
110110
case ANTSIZED: return 24;
111111
case MUCHSMALLER: return 26;

src/Services/Constants.vala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ namespace Jorts.Constants {
2727
const int DEBOUNCE = 1000;
2828

2929
// We need to say stop at some point
30-
const uint8 ZOOM_MAX = 240;
31-
const uint8 DEFAULT_ZOOM = 100;
32-
const uint8 ZOOM_MIN = 40;
30+
const uint16 ZOOM_MAX = 240;
31+
const uint16 DEFAULT_ZOOM = 100;
32+
const uint16 ZOOM_MIN = 40;
3333
const bool DEFAULT_MONO = false;
3434

3535
// For new stickies

src/Utils/ZoomConvert.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Jorts.Utils {
99

1010
/*************************************************/
1111
// We cannot use numbers in CSS, so we have to translate a number into a string
12-
public string zoom_to_class (uint8 zoom) {
12+
public string zoom_to_class (uint16 zoom) {
1313
switch (zoom) {
1414
case 20: return "antsized";
1515
case 40: return "muchsmaller";
@@ -32,7 +32,7 @@ namespace Jorts.Utils {
3232

3333
/*************************************************/
3434
// We cannot use numbers in CSS, so we have to translate a number into a string
35-
public uint8 zoom_to_ui_size (uint8 zoom) {
35+
public uint16 zoom_to_ui_size (uint16 zoom) {
3636
switch (zoom) {
3737
case 20: return 24;
3838
case 40: return 26;

src/Views/PopoverView.vala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public class Jorts.PopoverView : Gtk.Popover {
2626
set {on_monospace_changed (value);}
2727
}
2828

29-
private uint8 _old_zoom;
30-
public uint8 zoom {
29+
private uint16 _old_zoom;
30+
public uint16 zoom {
3131
get {return font_size_box.zoom;}
3232
set {do_set_zoom (value);}
3333
}
@@ -160,7 +160,7 @@ public class Jorts.PopoverView : Gtk.Popover {
160160
/**
161161
* Switch zoom classes, then reflect in the UI and tell the application
162162
*/
163-
private void do_set_zoom (uint8 new_zoom) {
163+
private void do_set_zoom (uint16 new_zoom) {
164164
debug ("Setting zoom: " + zoom.to_string ());
165165

166166
// Switches the classes that control font size

src/Widgets/PopoverWidgets/ZoomBox.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
public class Jorts.ZoomBox : Gtk.Box {
1414

1515
private Gtk.Button zoom_default_button;
16-
private uint8 _zoom = 100;
16+
private uint16 _zoom = 100;
1717

18-
public uint8 zoom {
18+
public uint16 zoom {
1919
get { return _zoom;}
2020
set {
2121
_zoom = value;

0 commit comments

Comments
 (0)