From d95ea4280a74dc11dbcb99862e45b1dc82680e7c Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 13 Apr 2022 17:12:10 +0200 Subject: [PATCH] Wrap init_pixmap with the DockApp method. That way, it will update properties of the object, without passing around ton of arguments. --- wmdocklib/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wmdocklib/__init__.py b/wmdocklib/__init__.py index 1ffd6c7..ccc45cd 100644 --- a/wmdocklib/__init__.py +++ b/wmdocklib/__init__.py @@ -26,3 +26,16 @@ class DockApp: if event['type'] == 'destroynotify': sys.exit(0) event = helpers.get_event() + + def prepare_pixmaps(self, background=None, patterns=None, style='3d', + margin=3): + + dockapp_size = (self.width, self.height) + + (self.char_width, self.char_height, self.charset_start, + self.charset_width) = helpers.init_pixmap(background, patterns, + style, dockapp_size[0], + dockapp_size[1], margin, + self.font, + self.background_color, + self.palette)