summaryrefslogtreecommitdiff
path: root/src/nigui/private/gtk3/platform_impl.nim
diff options
context:
space:
mode:
authortrustable-code <krauter.simon@arcor.de>2019-10-11 20:45:45 +0200
committertrustable-code <krauter.simon@arcor.de>2019-10-11 20:45:45 +0200
commitfcd0309a19e21dc126eaf19342e85e2206c7dca4 (patch)
tree602aefc9650867124ab4e100b9809caae07c0470 /src/nigui/private/gtk3/platform_impl.nim
parentcd2afa84897830cae0798b661b1054e8a6dd5d0c (diff)
downloadNiGui-fcd0309a19e21dc126eaf19342e85e2206c7dca4.tar.gz
NiGui-fcd0309a19e21dc126eaf19342e85e2206c7dca4.zip
Fixes #65 - Warnings about lock level
Diffstat (limited to 'src/nigui/private/gtk3/platform_impl.nim')
-rwxr-xr-xsrc/nigui/private/gtk3/platform_impl.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nigui/private/gtk3/platform_impl.nim b/src/nigui/private/gtk3/platform_impl.nim
index be9c695..c31f405 100755
--- a/src/nigui/private/gtk3/platform_impl.nim
+++ b/src/nigui/private/gtk3/platform_impl.nim
@@ -1270,7 +1270,7 @@ method `text=`(button: NativeButton, text: string) =
gtk_label_set_ellipsize(list.data, PANGO_ELLIPSIZE_END)
app.processEvents()
-method naturalWidth(button: NativeButton): int =
+method naturalWidth(button: NativeButton): int {.locks: "unknown".} =
# Override parent method, to make it big enough for the text to fit in.
var context = gtk_widget_get_style_context(button.fHandle)
var padding: GtkBorder
@@ -1306,7 +1306,7 @@ method `text=`(checkbox: NativeCheckbox, text: string) =
gtk_button_set_label(checkbox.fHandle, text)
app.processEvents()
-method naturalWidth(checkbox: NativeCheckbox): int =
+method naturalWidth(checkbox: NativeCheckbox): int {.locks: "unknown".} =
# Override parent method, to make it big enough for the text to fit in.
var context = gtk_widget_get_style_context(checkbox.fHandle)
var padding: GtkBorder
@@ -1344,7 +1344,7 @@ method `text=`(label: NativeLabel, text: string) =
gtk_label_set_text(label.fHandle, text)
app.processEvents()
-method naturalWidth(label: NativeLabel): int = label.getTextLineWidth(label.text) + 10
+method naturalWidth(label: NativeLabel): int {.locks: "unknown".} = label.getTextLineWidth(label.text) + 10
# Override parent method, to make it big enough for the text to fit in.
@@ -1385,7 +1385,7 @@ method `text=`(textBox: NativeTextBox, text: string) =
gtk_entry_set_text(textBox.fHandle, text)
app.processEvents()
-method naturalHeight(textBox: NativeTextBox): int = textBox.getTextLineHeight() + 12 # add padding
+method naturalHeight(textBox: NativeTextBox): int {.locks: "unknown".} = textBox.getTextLineHeight() + 12 # add padding
method setSize(textBox: NativeTextBox, width, height: int) =
gtk_entry_set_width_chars(textBox.fHandle, 1)