Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions usr/lib/sticky/sticky.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import os
import sys
import uuid

import gi
gi.require_version('Gdk', '3.0')
Expand Down Expand Up @@ -125,6 +126,7 @@
self.changed_timer_id = 0
self.invalid_cache = False

self.id = info.get('id', str(uuid.uuid4()))
self.x = info.get('x', 0)
self.y = info.get('y', 0)
self.height = info.get('height', self.app.settings.get_uint('default-height'))
Expand Down Expand Up @@ -393,6 +395,7 @@

(width, height) = self.get_size()
info = {
'id': self.id,
'x': self.x,
'y': self.y,
'height': self.height,
Expand Down Expand Up @@ -1018,7 +1021,7 @@
y_end = y + self.settings.get_uint('default-width')

if x < min_x or x_end > max_x or y < min_y or y_end > max_y:
# the calculated location wont work, so put the new note near the top left corner

Check failure on line 1024 in usr/lib/sticky/sticky.py

View workflow job for this annotation

GitHub Actions / build / build (mint22, linuxmintd/mint22-amd64, Mint 22, true) / Mint 22

wont ==> won't
x = workarea.x + 20
y = workarea.y + 20

Expand Down
Loading