diff --git a/docs/docs/config/window.md b/docs/docs/config/window.md index b8410c9732..2a4b91bc3d 100644 --- a/docs/docs/config/window.md +++ b/docs/docs/config/window.md @@ -3,47 +3,90 @@ title: 'window' language: 'en' --- -- `width` - define the initial window width. +### width - - Default: `600` +Define the initial window width. -- `height` - define the initial window height. +- Default: `600` - - Default: `400` +Example: -- `mode` - define how the window will be created +```toml +[window] +width = 600 +``` - - `Windowed` (default) is based on width and height - - `Maximized` window is created with maximized - - `Fullscreen` window is created with fullscreen +### height -- `opacity` Set window background opacity. +Define the initial window height. - - Default: `1.0`. +- Default: `400` -- `blur` Set blur on the window background. Changing this config requires restarting Rio to take effect. +Example: - - Default: `false`. +```toml +[window] +height = 400 +``` -- `background-image` Set an image as background. +### mode - - Default: `None` +Define how the window will be created -- `decorations` - Set window decorations - - `Enabled` (default for Windows/Linux/BSD) enable window decorations. - - `Disabled` disable all window decorations. - - `Transparent` (default for MacOS) window decorations with transparency. - - `Buttonless` remove buttons from window decorations. +- `Windowed` (default) is based on width and height +- `Maximized` window is created with maximized +- `Fullscreen` window is created with fullscreen Example: ```toml [window] -width = 600 -height = 400 mode = "Windowed" -opacity = 1.0 +``` + +### opacity + +Set window background opacity. + +- Default: `1.0`. + +Example: + +```toml +[window] +opacity = 0.5 +``` + +### blur + +Set blur on the window background. Changing this config requires restarting Rio to take effect. + +- Default: `false`. + +```toml +[window] blur = false +``` + +### background-image + +Set an image as background. + +- Default: `None` + +### decorations + +Set window decorations. + +- `Enabled` (default for Windows/Linux/BSD) enable window decorations. +- `Disabled` disable all window decorations. +- `Transparent` (default for MacOS) window decorations with transparency. +- `Buttonless` remove buttons from window decorations. + +Example: + +```toml +[window] decorations = "Enabled" ``` @@ -97,4 +140,46 @@ You can use MacOS unified titlebar by config, it's disabled by default. macos-use-unified-titlebar = false ``` -![Demo unified titlebar](/assets/demos/demo-macos-unified-titlebar.png) \ No newline at end of file +![Demo unified titlebar](/assets/demos/demo-macos-unified-titlebar.png) + +### MacOS: Enable or disable shadow + +You can enable window shadow on MacOS by config, it's disabled by default. + +```toml +[window] +macos-use-shadow = true +``` + +### Windows: Corner Preference + +Describes how the corners of a Microsoft Windows window should look like. + +Options: `Default`, `DoNotRound`,`Round` and `RoundSmall` + +```toml +[window] +windows-corner-preference = "Round" +``` + +### Windows: Undecorated shadow + +Microsoft Windows specific. + +Shows or hides the background drop shadow for undecorated windows. + +```toml +[window] +windows-use-undecorated-shadow = false +``` + +### Windows: use-no-redirection-bitmap + +Microsoft Windows specific. + +This sets `WS_EX_NOREDIRECTIONBITMAP`. + +```toml +[window] +windows-use-no-redirection-bitmap = false +``` diff --git a/docs/docs/releases.md b/docs/docs/releases.md index 1c75482fa4..5fff7786c2 100644 --- a/docs/docs/releases.md +++ b/docs/docs/releases.md @@ -11,6 +11,10 @@ language: 'en' ## 0.2.3 (unreleased) - Fixed: Nix build [#853](https://github.com/raphamorim/rio/pull/853). +- Support to `window.macos-use-shadow` (enable or disable shadow on MacOS). +- Support to `window.windows-corner-preference` (options: `Default`, `DoNotRound`,`Round` and `RoundSmall`). +- Support to `window.windows-use-undecorated-shadow` (default is enabled). +- Support to `window.windows-use-no-redirection-bitmap` (This sets `WS_EX_NOREDIRECTIONBITMAP`). - Support for Unicode 16 characters. - Support to line height. - Fixed: Deb package name 'rio' conflicts with existing one in Ubuntu [#876](https://github.com/raphamorim/rio/issues/876). diff --git a/frontends/rioterm/src/router/window.rs b/frontends/rioterm/src/router/window.rs index 3e58fa7908..d9fcdaaa33 100644 --- a/frontends/rioterm/src/router/window.rs +++ b/frontends/rioterm/src/router/window.rs @@ -73,6 +73,24 @@ pub fn create_window_builder( window_builder = window_builder.with_name(APPLICATION_ID, ""); } + #[cfg(target_os = "windows")] + { + use rio_window::platform::windows::WindowAttributesExtWindows; + if let Some(use_undecorated_shadow) = config.window.windows_use_undecorated_shadow + { + window_builder = + window_builder.with_undecorated_shadow(use_undecorated_shadow); + } + + if let Some(use_no_redirection_bitmap) = + config.window.windows_use_no_redirection_bitmap + { + // This sets WS_EX_NOREDIRECTIONBITMAP. + window_builder = + window_builder.with_no_redirection_bitmap(use_no_redirection_bitmap); + } + } + #[cfg(target_os = "macos")] { use rio_window::platform::macos::WindowAttributesExtMacOS; @@ -165,9 +183,36 @@ pub fn configure_window(winit_window: &Window, config: &Config) { bg_color.b, config.window.opacity as f64, ); - winit_window.set_has_shadow(!is_transparent); + + if !config.window.macos_use_shadow { + winit_window.set_has_shadow(false); + } } + #[cfg(target_os = "windows")] + { + use rio_backend::config::window::WindowsCornerPreference; + use rio_window::platform::windows::WindowExtWindows; + + if let Some(with_corner_preference) = &config.window.windows_corner_preference { + let preference = match with_corner_preference { + WindowsCornerPreference::Default => { + rio_window::platform::windows::CornerPreference::Default + } + WindowsCornerPreference::DoNotRound => { + rio_window::platform::windows::CornerPreference::DoNotRound + } + WindowsCornerPreference::Round => { + rio_window::platform::windows::CornerPreference::Round + } + WindowsCornerPreference::RoundSmall => { + rio_window::platform::windows::CornerPreference::RoundSmall + } + }; + + winit_window.set_corner_preference(preference); + } + } if let Some(title) = &config.window.initial_title { winit_window.set_title(title); } diff --git a/frontends/swift-ui/Rio.xcodeproj/project.pbxproj b/frontends/swift-ui/Rio.xcodeproj/project.pbxproj deleted file mode 100644 index d90c3a7d1e..0000000000 --- a/frontends/swift-ui/Rio.xcodeproj/project.pbxproj +++ /dev/null @@ -1,610 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 56; - objects = { - -/* Begin PBXBuildFile section */ - 89107F722B01009500F35DED /* RioApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89107F712B01009500F35DED /* RioApp.swift */; }; - 89107F742B01009500F35DED /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89107F732B01009500F35DED /* ContentView.swift */; }; - 89107F762B01009600F35DED /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 89107F752B01009600F35DED /* Assets.xcassets */; }; - 89107FA02B01026100F35DED /* Panel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89107F9F2B01026100F35DED /* Panel.swift */; }; - 89107FA42B01032D00F35DED /* PanelGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89107FA32B01032D00F35DED /* PanelGroup.swift */; }; - 89107FA62B01046F00F35DED /* PanelSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89107FA52B01046F00F35DED /* PanelSection.swift */; }; - 89107FA82B01062B00F35DED /* SidebarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89107FA72B01062B00F35DED /* SidebarView.swift */; }; - 89107FAA2B01064F00F35DED /* PanelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89107FA92B01064F00F35DED /* PanelView.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 89107F802B01009600F35DED /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 89107F662B01009400F35DED /* Project object */; - proxyType = 1; - remoteGlobalIDString = 89107F6D2B01009500F35DED; - remoteInfo = Rio; - }; - 89107F8A2B01009600F35DED /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 89107F662B01009400F35DED /* Project object */; - proxyType = 1; - remoteGlobalIDString = 89107F6D2B01009500F35DED; - remoteInfo = Rio; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 89107F6E2B01009500F35DED /* Rio.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rio.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 89107F712B01009500F35DED /* RioApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RioApp.swift; sourceTree = ""; }; - 89107F732B01009500F35DED /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - 89107F752B01009600F35DED /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 89107F772B01009600F35DED /* Rio.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Rio.entitlements; sourceTree = ""; }; - 89107F7F2B01009600F35DED /* RioTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RioTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 89107F892B01009600F35DED /* RioUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RioUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 89107F9F2B01026100F35DED /* Panel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Panel.swift; sourceTree = ""; }; - 89107FA32B01032D00F35DED /* PanelGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanelGroup.swift; sourceTree = ""; }; - 89107FA52B01046F00F35DED /* PanelSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanelSection.swift; sourceTree = ""; }; - 89107FA72B01062B00F35DED /* SidebarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarView.swift; sourceTree = ""; }; - 89107FA92B01064F00F35DED /* PanelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanelView.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 89107F6B2B01009500F35DED /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 89107F7C2B01009600F35DED /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 89107F862B01009600F35DED /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 89107F652B01009400F35DED = { - isa = PBXGroup; - children = ( - 89107F702B01009500F35DED /* Rio */, - 89107F6F2B01009500F35DED /* Products */, - ); - sourceTree = ""; - }; - 89107F6F2B01009500F35DED /* Products */ = { - isa = PBXGroup; - children = ( - 89107F6E2B01009500F35DED /* Rio.app */, - 89107F7F2B01009600F35DED /* RioTests.xctest */, - 89107F892B01009600F35DED /* RioUITests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 89107F702B01009500F35DED /* Rio */ = { - isa = PBXGroup; - children = ( - 89107F9C2B0101E500F35DED /* Model */, - 89107F712B01009500F35DED /* RioApp.swift */, - 89107FA92B01064F00F35DED /* PanelView.swift */, - 89107F732B01009500F35DED /* ContentView.swift */, - 89107FA72B01062B00F35DED /* SidebarView.swift */, - 89107F752B01009600F35DED /* Assets.xcassets */, - 89107F772B01009600F35DED /* Rio.entitlements */, - ); - path = Rio; - sourceTree = ""; - }; - 89107F9C2B0101E500F35DED /* Model */ = { - isa = PBXGroup; - children = ( - 89107F9F2B01026100F35DED /* Panel.swift */, - 89107FA32B01032D00F35DED /* PanelGroup.swift */, - 89107FA52B01046F00F35DED /* PanelSection.swift */, - ); - path = Model; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 89107F6D2B01009500F35DED /* Rio */ = { - isa = PBXNativeTarget; - buildConfigurationList = 89107F932B01009600F35DED /* Build configuration list for PBXNativeTarget "Rio" */; - buildPhases = ( - 89107F6A2B01009500F35DED /* Sources */, - 89107F6B2B01009500F35DED /* Frameworks */, - 89107F6C2B01009500F35DED /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Rio; - productName = Rio; - productReference = 89107F6E2B01009500F35DED /* Rio.app */; - productType = "com.apple.product-type.application"; - }; - 89107F7E2B01009600F35DED /* RioTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 89107F962B01009600F35DED /* Build configuration list for PBXNativeTarget "RioTests" */; - buildPhases = ( - 89107F7B2B01009600F35DED /* Sources */, - 89107F7C2B01009600F35DED /* Frameworks */, - 89107F7D2B01009600F35DED /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 89107F812B01009600F35DED /* PBXTargetDependency */, - ); - name = RioTests; - productName = RioTests; - productReference = 89107F7F2B01009600F35DED /* RioTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 89107F882B01009600F35DED /* RioUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 89107F992B01009600F35DED /* Build configuration list for PBXNativeTarget "RioUITests" */; - buildPhases = ( - 89107F852B01009600F35DED /* Sources */, - 89107F862B01009600F35DED /* Frameworks */, - 89107F872B01009600F35DED /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 89107F8B2B01009600F35DED /* PBXTargetDependency */, - ); - name = RioUITests; - productName = RioUITests; - productReference = 89107F892B01009600F35DED /* RioUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 89107F662B01009400F35DED /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1500; - LastUpgradeCheck = 1500; - TargetAttributes = { - 89107F6D2B01009500F35DED = { - CreatedOnToolsVersion = 15.0.1; - }; - 89107F7E2B01009600F35DED = { - CreatedOnToolsVersion = 15.0.1; - TestTargetID = 89107F6D2B01009500F35DED; - }; - 89107F882B01009600F35DED = { - CreatedOnToolsVersion = 15.0.1; - TestTargetID = 89107F6D2B01009500F35DED; - }; - }; - }; - buildConfigurationList = 89107F692B01009400F35DED /* Build configuration list for PBXProject "Rio" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 89107F652B01009400F35DED; - productRefGroup = 89107F6F2B01009500F35DED /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 89107F6D2B01009500F35DED /* Rio */, - 89107F7E2B01009600F35DED /* RioTests */, - 89107F882B01009600F35DED /* RioUITests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 89107F6C2B01009500F35DED /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 89107F762B01009600F35DED /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 89107F7D2B01009600F35DED /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 89107F872B01009600F35DED /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 89107F6A2B01009500F35DED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 89107FAA2B01064F00F35DED /* PanelView.swift in Sources */, - 89107FA62B01046F00F35DED /* PanelSection.swift in Sources */, - 89107FA42B01032D00F35DED /* PanelGroup.swift in Sources */, - 89107F742B01009500F35DED /* ContentView.swift in Sources */, - 89107FA02B01026100F35DED /* Panel.swift in Sources */, - 89107F722B01009500F35DED /* RioApp.swift in Sources */, - 89107FA82B01062B00F35DED /* SidebarView.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 89107F7B2B01009600F35DED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 89107F852B01009600F35DED /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 89107F812B01009600F35DED /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 89107F6D2B01009500F35DED /* Rio */; - targetProxy = 89107F802B01009600F35DED /* PBXContainerItemProxy */; - }; - 89107F8B2B01009600F35DED /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 89107F6D2B01009500F35DED /* Rio */; - targetProxy = 89107F8A2B01009600F35DED /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 89107F912B01009600F35DED /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 89107F922B01009600F35DED /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SWIFT_COMPILATION_MODE = wholemodule; - }; - name = Release; - }; - 89107F942B01009600F35DED /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = Rio/Rio.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = ""; - DEVELOPMENT_TEAM = V3V92VA6SS; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 13.6; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = raphaelamorim.Rio; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 89107F952B01009600F35DED /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = Rio/Rio.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_ASSET_PATHS = ""; - DEVELOPMENT_TEAM = V3V92VA6SS; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; - "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; - "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; - "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; - MACOSX_DEPLOYMENT_TARGET = 13.6; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = raphaelamorim.Rio; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 89107F972B01009600F35DED /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = V3V92VA6SS; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - MACOSX_DEPLOYMENT_TARGET = 13.6; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = raphaelamorim.RioTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rio.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Rio"; - }; - name = Debug; - }; - 89107F982B01009600F35DED /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = V3V92VA6SS; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - MACOSX_DEPLOYMENT_TARGET = 13.6; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = raphaelamorim.RioTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rio.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Rio"; - }; - name = Release; - }; - 89107F9A2B01009600F35DED /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = V3V92VA6SS; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - MACOSX_DEPLOYMENT_TARGET = 13.6; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = raphaelamorim.RioUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = Rio; - }; - name = Debug; - }; - 89107F9B2B01009600F35DED /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = V3V92VA6SS; - GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17.0; - MACOSX_DEPLOYMENT_TARGET = 13.6; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = raphaelamorim.RioUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; - SWIFT_EMIT_LOC_STRINGS = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = Rio; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 89107F692B01009400F35DED /* Build configuration list for PBXProject "Rio" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 89107F912B01009600F35DED /* Debug */, - 89107F922B01009600F35DED /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 89107F932B01009600F35DED /* Build configuration list for PBXNativeTarget "Rio" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 89107F942B01009600F35DED /* Debug */, - 89107F952B01009600F35DED /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 89107F962B01009600F35DED /* Build configuration list for PBXNativeTarget "RioTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 89107F972B01009600F35DED /* Debug */, - 89107F982B01009600F35DED /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 89107F992B01009600F35DED /* Build configuration list for PBXNativeTarget "RioUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 89107F9A2B01009600F35DED /* Debug */, - 89107F9B2B01009600F35DED /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 89107F662B01009400F35DED /* Project object */; -} diff --git a/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a625..0000000000 --- a/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003d..0000000000 --- a/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/xcuserdata/hugoamor.xcuserdatad/UserInterfaceState.xcuserstate b/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/xcuserdata/hugoamor.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index a10cd09914..0000000000 Binary files a/frontends/swift-ui/Rio.xcodeproj/project.xcworkspace/xcuserdata/hugoamor.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/frontends/swift-ui/Rio.xcodeproj/xcuserdata/hugoamor.xcuserdatad/xcschemes/xcschememanagement.plist b/frontends/swift-ui/Rio.xcodeproj/xcuserdata/hugoamor.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 6cbbb1d8ac..0000000000 --- a/frontends/swift-ui/Rio.xcodeproj/xcuserdata/hugoamor.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - Rio.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/frontends/swift-ui/Rio/Assets.xcassets/AccentColor.colorset/Contents.json b/frontends/swift-ui/Rio/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897008..0000000000 --- a/frontends/swift-ui/Rio/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/frontends/swift-ui/Rio/Assets.xcassets/AppIcon.appiconset/Contents.json b/frontends/swift-ui/Rio/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 532cd729c6..0000000000 --- a/frontends/swift-ui/Rio/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "16x16" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "16x16" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "32x32" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "32x32" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "128x128" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "128x128" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "256x256" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "256x256" - }, - { - "idiom" : "mac", - "scale" : "1x", - "size" : "512x512" - }, - { - "idiom" : "mac", - "scale" : "2x", - "size" : "512x512" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/frontends/swift-ui/Rio/Assets.xcassets/Contents.json b/frontends/swift-ui/Rio/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596a7..0000000000 --- a/frontends/swift-ui/Rio/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/frontends/swift-ui/Rio/ContentView.swift b/frontends/swift-ui/Rio/ContentView.swift deleted file mode 100644 index 2799fd460d..0000000000 --- a/frontends/swift-ui/Rio/ContentView.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// ContentView.swift -// Rio -// -// Created by Raphael Amorim on 2023-11-12. -// - -import SwiftUI - -struct ContentView: View { - @State private var allPanels = Panel.examples() - @State private var selection: PanelSection = PanelSection.all - @State private var userCreatedGroups: [PanelGroup] = PanelGroup.examples() - - var body: some View { - NavigationSplitView { - SidebarView(userCreatedGroups: userCreatedGroups, selection: $selection) - } detail: { - - switch selection { - case .all: - PanelView(title: "All", panels: allPanels) - case .done: - PanelView(title: "Done", panels: allPanels) - case .upcoming: - PanelView(title: "Upcoming", panels: allPanels) - case .list(let panelGroup): - PanelView(title: panelGroup.title, panels: panelGroup.panels) - } - } - } -} - -#Preview { - ContentView() -} diff --git a/frontends/swift-ui/Rio/Model/Panel.swift b/frontends/swift-ui/Rio/Model/Panel.swift deleted file mode 100644 index b517d180b2..0000000000 --- a/frontends/swift-ui/Rio/Model/Panel.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// Panel.swift -// Rio -// -// Created by Raphael Amorim on 2023-11-12. -// - -import Foundation - -struct Panel: Identifiable, Hashable { - let id = UUID() - var title: String - - init(title: String) { - self.title = title - } - - static func example() -> Panel { - Panel(title: "zsh") - } - - static func examples() -> [Panel] { - [ - Panel(title: "zsh"), - Panel(title: "vim"), - Panel(title: "nvim"), - ] - } -} diff --git a/frontends/swift-ui/Rio/Model/PanelGroup.swift b/frontends/swift-ui/Rio/Model/PanelGroup.swift deleted file mode 100644 index 32f3fcf65e..0000000000 --- a/frontends/swift-ui/Rio/Model/PanelGroup.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// PanelGroup.swift -// Rio -// -// Created by Raphael Amorim on 2023-11-12. -// - -import Foundation - -struct PanelGroup: Identifiable, Hashable { - let id = UUID() - var title: String - var panels: [Panel] - - init(title: String, panels: [Panel] = []) { - self.title = title - self.panels = panels - } - - static func example() -> PanelGroup { - let panel1 = Panel(title: "zsh") - let panel2 = Panel(title: "nvim") - let panel3 = Panel(title: "nvim") - - var group = PanelGroup(title: "oi") - group.panels = [panel1, panel2, panel3] - return group - } - - static func examples() -> [PanelGroup] { - let group1 = PanelGroup.example() - let group2 = PanelGroup(title: "oi") - return [group1, group2] - } -} diff --git a/frontends/swift-ui/Rio/Model/PanelSection.swift b/frontends/swift-ui/Rio/Model/PanelSection.swift deleted file mode 100644 index 0c02994443..0000000000 --- a/frontends/swift-ui/Rio/Model/PanelSection.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// PanelSection.swift -// Rio -// -// Created by Raphael Amorim on 2023-11-12. -// - -import Foundation - -enum PanelSection: Identifiable, CaseIterable, Hashable { - case all - case done - case upcoming - case list(PanelGroup) - - var id: String { - switch self { - case .all: - "all" - case .done: - "done" - case .upcoming: - "upcoming" - case .list(let panelGroup): - panelGroup.id.uuidString - } - } - - var displayName: String { - switch self { - case .all: - "All" - case .done: - "Done" - case .upcoming: - "Upcoming" - case .list(let panelGroup): - panelGroup.title - } - } - - var iconName: String { - switch self { - case .all: - "star" - case .done: - "checkmark.circle" - case .upcoming: - "calendar" - case .list(_): - "folder" - } - } - - static var allCases: [PanelSection] { - [.all, .done, .upcoming] - } - - static func == (lhs: PanelSection, rhs: PanelSection) -> Bool { - lhs.id == rhs.id - } -} diff --git a/frontends/swift-ui/Rio/PanelView.swift b/frontends/swift-ui/Rio/PanelView.swift deleted file mode 100644 index cb43a1ea86..0000000000 --- a/frontends/swift-ui/Rio/PanelView.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// PanelView.swift -// Rio -// -// Created by Raphael Amorim on 2023-11-12. -// - -import SwiftUI - -struct PanelView: View { - let title: String - let panels: [Panel] - - var body: some View { -// List(panels) { panel in -// HStack { -// Image(systemName: "circle") -// Text(panel.title) -// } -// } - Color.black - .overlay( - VStack(spacing: 20) { - Text("Panel").font(.largeTitle) - }) - } -} - -#Preview { - PanelView(title: "work", panels: Panel.examples()) -} diff --git a/frontends/swift-ui/Rio/Rio.entitlements b/frontends/swift-ui/Rio/Rio.entitlements deleted file mode 100644 index f2ef3ae026..0000000000 --- a/frontends/swift-ui/Rio/Rio.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - - - diff --git a/frontends/swift-ui/Rio/RioApp.swift b/frontends/swift-ui/Rio/RioApp.swift deleted file mode 100644 index 0cdb7af5e3..0000000000 --- a/frontends/swift-ui/Rio/RioApp.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// RioApp.swift -// Rio -// -// Created by Raphael Amorim on 2023-11-12. -// - -import SwiftUI - -@main -struct RioApp: App { - var body: some Scene { - WindowGroup { - ContentView() - } - } -} diff --git a/frontends/swift-ui/Rio/SidebarView.swift b/frontends/swift-ui/Rio/SidebarView.swift deleted file mode 100644 index e0bbb456b7..0000000000 --- a/frontends/swift-ui/Rio/SidebarView.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// SidebarView.swift -// Rio -// -// Created by Raphael Amorim on 2023-11-12. -// - -import SwiftUI - -struct SidebarView: View { - let userCreatedGroups: [PanelGroup] - @Binding var selection: PanelSection -// @State private var selection = PanelSection.all - - var body: some View { - List(selection: $selection) { - Section("Work") { - ForEach(PanelSection.allCases) { - selection in Label(selection.displayName, systemImage: selection.iconName) - .tag(selection) - } - } - - Section("Personal") { - ForEach(userCreatedGroups) { - group in Label(group.title, systemImage: "folder") - .tag(PanelSection.list(group)) - } - } - } - } -} - -#Preview { - SidebarView(userCreatedGroups: PanelGroup.examples(), selection: .constant(.all)) - .listStyle(.sidebar) -} diff --git a/rio-backend/src/config/window.rs b/rio-backend/src/config/window.rs index e67844f038..6534de1347 100644 --- a/rio-backend/src/config/window.rs +++ b/rio-backend/src/config/window.rs @@ -39,6 +39,18 @@ impl Default for Decorations { } } +#[derive(PartialEq, Serialize, Deserialize, Clone, Debug)] +pub enum WindowsCornerPreference { + #[serde(alias = "default")] + Default = 0, + #[serde(alias = "donotround")] + DoNotRound = 1, + #[serde(alias = "round")] + Round = 2, + #[serde(alias = "roundsmall")] + RoundSmall = 3, +} + #[derive(PartialEq, Serialize, Deserialize, Clone, Debug)] pub struct Window { #[serde(default = "default_window_width")] @@ -57,8 +69,19 @@ pub struct Window { pub decorations: Decorations, #[serde(default = "bool::default", rename = "macos-use-unified-titlebar")] pub macos_use_unified_titlebar: bool, + #[serde(rename = "macos-use-shadow", default = "default_bool_true")] + pub macos_use_shadow: bool, #[serde(rename = "initial-title", skip_serializing)] pub initial_title: Option, + #[serde(rename = "windows-use-undecorated-shadow", default = "Option::default")] + pub windows_use_undecorated_shadow: Option, + #[serde( + rename = "windows-use-no-redirection-bitmap", + default = "Option::default" + )] + pub windows_use_no_redirection_bitmap: Option, + #[serde(rename = "windows-corner-preference", default = "Option::default")] + pub windows_corner_preference: Option, } impl Default for Window { @@ -72,7 +95,11 @@ impl Default for Window { decorations: Decorations::default(), blur: false, macos_use_unified_titlebar: false, + macos_use_shadow: true, initial_title: None, + windows_use_undecorated_shadow: None, + windows_use_no_redirection_bitmap: None, + windows_corner_preference: None, } } }