Skip to content

Commit

Permalink
Big news
Browse files Browse the repository at this point in the history
  • Loading branch information
jhi2 committed Jul 14, 2024
1 parent c4388fa commit 0416a28
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions PyUI3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
WinUI3 with Python!
"""

__version__ = "5.2.0"
__version__ = "5.3.0"

import pythoncom
from win32more.Microsoft.UI.Xaml.Controls import (
AnimatedIcon, AutoSuggestBox, BreadcrumbBar, Button, CalendarDatePicker,
CalendarView, CheckBox, ColorPicker, ComboBox, CommandBar, CommandBarFlyout,
Expand All @@ -21,17 +22,26 @@
from win32more.xaml import XamlApplication
from win32more.Microsoft.UI.Xaml.Media import MicaBackdrop

class App(XamlApplication):
def __init__(self):
pythoncom.CoInitialize()
super().__init__()
self.win = None

def OnLaunched(self, args):
self.win = Window()

class ApplicationWindow:
def __init__(self):
self.roster = []
self.app = App()
self.app.Start()
self.win = self.app.win

def add(self, item):
self.roster.append(item)

def run(self):
self.app.Start()
for item in self.roster:
self.win.Content = item
self.win.Activate()
Expand All @@ -44,10 +54,3 @@ def set_mica(self, mode):
self.win.SystemBackdrop = MicaBackdrop()
else:
self.win.SystemBackdrop = None

class App(XamlApplication):
def __init__(self):
super().__init__()

def OnLaunched(self, args):
self.win = Window()

0 comments on commit 0416a28

Please sign in to comment.