pygui: refactored images.py and fixed issue with recreating a default config.yaml every time the gui was started
This commit is contained in:
parent
47ac4c850d
commit
a6fadb76cc
16 changed files with 96 additions and 103 deletions
|
@ -6,10 +6,10 @@ import tkinter as tk
|
|||
from tkinter import ttk
|
||||
from typing import TYPE_CHECKING, List, Optional
|
||||
|
||||
from core.gui import images
|
||||
from core.gui.appconfig import BACKGROUNDS_PATH
|
||||
from core.gui.dialogs.dialog import Dialog
|
||||
from core.gui.graph.graph import CanvasGraph
|
||||
from core.gui.images import Images
|
||||
from core.gui.themes import PADX, PADY
|
||||
from core.gui.widgets import image_chooser
|
||||
|
||||
|
@ -132,7 +132,7 @@ class CanvasWallpaperDialog(Dialog):
|
|||
self.draw_preview()
|
||||
|
||||
def draw_preview(self) -> None:
|
||||
image = Images.create(self.filename.get(), 250, 135)
|
||||
image = images.from_file(self.filename.get(), width=250, height=135)
|
||||
self.image_label.config(image=image)
|
||||
self.image_label.image = image
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue