diff --git a/data/gtk.glade b/data/gtk.glade
index 96800d1..1fff786 100644
--- a/data/gtk.glade
+++ b/data/gtk.glade
@@ -1970,7 +1970,7 @@
center
appwindow
CoverGrid
- 1.3.3
+ 1.3.4
CoverGrid is a client for the Music Player Daemon, focusing on albums instead of single tracks.
http://www.suruatoel.xyz/codes/mcg
mcg.svg
diff --git a/mcg/widgets.py b/mcg/widgets.py
index 4cc060e..c33905c 100644
--- a/mcg/widgets.py
+++ b/mcg/widgets.py
@@ -1594,7 +1594,7 @@ class LibraryPanel(GObject.GObject):
return
self._allocation = new_allocation
self._grid_scale.clear_marks()
- width = widget.get_allocation().width - 12
+ width = widget.get_allocation().width
lower = int(self._grid_adjustment.get_lower())
upper = int(self._grid_adjustment.get_upper())
@@ -1602,7 +1602,7 @@ class LibraryPanel(GObject.GObject):
countMax = max(int(width / lower), 1)
for index in range(countMin, countMax):
pixel = int(width / index)
- pixel = pixel - int(pixel / 100)
+ pixel = pixel - (2 * int(pixel / 100))
self._grid_scale.add_mark(
pixel,
Gtk.PositionType.BOTTOM,
@@ -1626,13 +1626,13 @@ class LibraryPanel(GObject.GObject):
def on_grid_scale_change(self, widget, scroll, value):
- size = round(value)
+ size = math.floor(value)
range = self._grid_scale.get_adjustment()
if size < range.get_lower() or size > range.get_upper():
return
self._item_size = size
- GObject.idle_add(self._set_widget_grid_size, self._library_grid, size, True)
GObject.idle_add(self._library_grid.set_item_padding, size / 100)
+ GObject.idle_add(self._set_widget_grid_size, self._library_grid, size, True)
def on_grid_scale_changed(self, widget, event):
diff --git a/setup.py b/setup.py
index bf763bd..5c92b2e 100644
--- a/setup.py
+++ b/setup.py
@@ -53,7 +53,7 @@ setup(
'build_py': build_mcg
},
name = "mcg",
- version = '1.3.3',
+ version = '1.3.4',
description = "CoverGrid (mcg) is a client for the Music Player Daemon, focusing on albums instead of single tracks.",
url = "http://www.suruatoel.xyz/codes/mcg",
author = "coderkun",