Initial commit: DLS - Dental Lab System
- Flutter + PocketBase dental lab management system - Clinic & lab dashboards, job tracking, patient management - Product catalog, finance tracking, multi-language support - AI assistant integration, realtime notifications - Windows installer (Inno Setup) included - Developed by kovakyazilim.com
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import Cocoa
|
||||
import FlutterMacOS
|
||||
|
||||
class MainFlutterWindow: NSWindow {
|
||||
override func awakeFromNib() {
|
||||
let flutterViewController = FlutterViewController()
|
||||
|
||||
// Center window with a sensible default size
|
||||
let screenSize = NSScreen.main?.frame.size ?? CGSize(width: 1440, height: 900)
|
||||
let windowWidth: CGFloat = min(1280, screenSize.width * 0.85)
|
||||
let windowHeight: CGFloat = min(820, screenSize.height * 0.85)
|
||||
let origin = CGPoint(
|
||||
x: (screenSize.width - windowWidth) / 2,
|
||||
y: (screenSize.height - windowHeight) / 2
|
||||
)
|
||||
let windowFrame = NSRect(origin: origin, size: CGSize(width: windowWidth, height: windowHeight))
|
||||
|
||||
self.contentViewController = flutterViewController
|
||||
self.setFrame(windowFrame, display: true)
|
||||
|
||||
// Keep sidebar always visible — desktop layout kicks in at 720px
|
||||
self.minSize = CGSize(width: 880, height: 560)
|
||||
self.titlebarAppearsTransparent = true
|
||||
|
||||
RegisterGeneratedPlugins(registry: flutterViewController)
|
||||
|
||||
super.awakeFromNib()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user