├── RetiledStyles
├── ActionCenterNotificationItem.qml
├── qmldir
├── ActionCenterTextOnlyButton.qml
├── TileBackgroundSolidColorRectangle.qml
├── RoundButton.qml
├── ContextMenu.qml
├── AppBarMoreButton.qml
├── FontStyles.qml
├── PlainPageHeader.qml
├── TileBackgroundShaderEffectSource.qml
├── ActionCenterActionButton.qml
├── AppBarBase.qml
├── AppBarDrawerEntry.qml
└── AppBarDrawer.qml
├── LICENSE.GPLv2
├── docs
├── images
│ ├── tiles.png
│ ├── all-apps.png
│ ├── preview.png
│ ├── edit-mode.png
│ ├── search-app.png
│ ├── search-app-about.png
│ ├── search-prototype.png
│ ├── tiles-with-icons.png
│ ├── working-on-icons.png
│ ├── search-app-appbar.png
│ ├── all-apps-with-icons.png
│ ├── tiles-with-wallpaper.png
│ ├── pin-to-start-contextmenu.png
│ ├── three-column-layout-test.png
│ └── reference
│ │ ├── small tile folder.png
│ │ ├── just a medium-size tile folder.png
│ │ ├── wide Live Tile preview in tile folder.png
│ │ ├── wp-emulator-screenshot-at-100-percent-scale.png
│ │ ├── medium Live Tile preview in medium tile folder.png
│ │ ├── wp-emulator-allapps-screenshot-at-100-percent-scale.png
│ │ └── medium Live Tile preview in tile folder plus mini-tile flipping.png
├── ytshorts-descriptions
│ ├── RetiledStart-demo-2.md
│ ├── Avalonia-Xwayland-Phosh-bug-demonstration.md
│ ├── RetiledStart-demo-3.md
│ ├── RetiledStart-demo-1.md
│ ├── RetiledActionCenter-demo-1.md
│ ├── RetiledSearch-demo-1.md
│ ├── RetiledCompositor-demo-1.md
│ └── RetiledStart-demo-5.md
├── to-be-organized_extra-stuff-thatll-help.md
├── system-requirements.md
├── sticky-notes-archive.md
└── running-the-compositor.md
├── RetiledActionCenter
├── RetiledStart.pyproject
└── libs
│ ├── libRetiledActionCenter
│ └── actioncentercommands.py
│ └── libRetiledSettings
│ └── settingsReader.py
├── RetiledSettings
├── RetiledSettings.pyproject
├── configs
│ └── accessibility.config
└── libs
│ └── libRetiledSettings
│ └── settingsReader.py
├── RetiledStart
├── RetiledStart
│ ├── RetiledStart.pyproject
│ ├── pages
│ │ └── wallpaper.jpg
│ └── libs
│ │ ├── libRetiledStartPy
│ │ └── startlayout.yaml
│ │ └── libRetiledSettings
│ │ └── settingsReader.py
└── where are the Avalonia-based files.md
├── Scripts
├── retiledstart.desktop
├── retiledsearch.desktop
├── run-retiledsearch.sh
├── run-retiledstart.sh
├── uninstall-retiled.sh
├── build-retiledsearch.sh
├── build-retiledstart.sh
└── install-retiled.sh
├── fonts
└── wp-metro
│ ├── WP-Metro.ttf
│ ├── README.md
│ └── OFL.txt
├── RetiledSearch
├── RetiledSearch
│ ├── RetiledSearch.pyproject
│ └── libs
│ │ └── libRetiledSettings
│ │ └── settingsReader.py
└── where are the Avalonia-based files.md
├── RetiledCompositor
└── RetiledCompositor
│ ├── RetiledSearch.pyproject
│ └── libs
│ └── libRetiledSettings
│ └── settingsReader.py
├── RetiledThemes
└── Retiled-Metro
│ └── Retiled-Metro.ini
├── TestProjects
├── qt-cpp test
│ ├── test2_en_US.ts
│ ├── main.qml
│ ├── searcher.h
│ ├── searcher.cpp
│ ├── CMakeLists.txt
│ └── main.cpp
├── WP8.1 app
│ ├── WP8.1 app
│ │ ├── Assets
│ │ │ ├── Logo.scale-240.png
│ │ │ ├── Logo.scale-240.png.bak
│ │ │ ├── WideLogo.scale-240.png
│ │ │ ├── SmallLogo.scale-240.png
│ │ │ ├── StoreLogo.scale-240.png
│ │ │ ├── SplashScreen.scale-240.png
│ │ │ └── Square71x71Logo.scale-240.png
│ │ ├── App.xaml
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.vb
│ │ ├── My Project
│ │ │ └── AssemblyInfo.vb
│ │ ├── Package.appxmanifest
│ │ └── App.xaml.vb
│ └── WP8.1 app.sln
└── RetiledWinUITests
│ ├── RetiledWinUITests
│ ├── RetiledWinUITests (Package)
│ │ ├── Images
│ │ │ ├── StoreLogo.png
│ │ │ ├── LockScreenLogo.scale-200.png
│ │ │ ├── SplashScreen.scale-200.png
│ │ │ ├── Square44x44Logo.scale-200.png
│ │ │ ├── Wide310x150Logo.scale-200.png
│ │ │ ├── Square150x150Logo.scale-200.png
│ │ │ └── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── Package.appxmanifest
│ │ └── RetiledWinUITests (Package).wapproj
│ └── RetiledWinUITests
│ │ ├── App.xaml
│ │ ├── app.manifest
│ │ ├── MainWindow.xaml.cs
│ │ ├── RetiledWinUITests.csproj
│ │ └── App.xaml.cs
│ └── RetiledWinUITests.sln
├── icons
└── actions
│ ├── README.md
│ ├── ellipsis_white.svg
│ └── ellipsis.svg
├── LICENSE.PyYAML.MIT
├── clean-test-environment
└── clean
│ ├── main.cpp
│ ├── main.qml
│ └── CMakeLists.txt
└── LICENSE_ForSpecifiedLibraries.MIT
/RetiledStyles/ActionCenterNotificationItem.qml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/LICENSE.GPLv2:
--------------------------------------------------------------------------------
1 | Please check the file named "LICENSE.GPL" for the GPLv2.
2 |
--------------------------------------------------------------------------------
/RetiledStyles/qmldir:
--------------------------------------------------------------------------------
1 | module FontStylesModule
2 | singleton FontStyles 1.0 FontStyles.qml
--------------------------------------------------------------------------------
/docs/images/tiles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/tiles.png
--------------------------------------------------------------------------------
/RetiledActionCenter/RetiledStart.pyproject:
--------------------------------------------------------------------------------
1 | {
2 | "files": ["main.py", "MainWindow.qml"]
3 | }
4 |
--------------------------------------------------------------------------------
/RetiledSettings/RetiledSettings.pyproject:
--------------------------------------------------------------------------------
1 | {
2 | "files": ["main.py", "MainWindow.qml"]
3 | }
4 |
--------------------------------------------------------------------------------
/docs/images/all-apps.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/all-apps.png
--------------------------------------------------------------------------------
/docs/images/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/preview.png
--------------------------------------------------------------------------------
/RetiledStart/RetiledStart/RetiledStart.pyproject:
--------------------------------------------------------------------------------
1 | {
2 | "files": ["main.py", "MainWindow.qml"]
3 | }
4 |
--------------------------------------------------------------------------------
/Scripts/retiledstart.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=RetiledStart
3 | Type=Application
4 | Exec=retiledstart
--------------------------------------------------------------------------------
/docs/images/edit-mode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/edit-mode.png
--------------------------------------------------------------------------------
/docs/images/search-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/search-app.png
--------------------------------------------------------------------------------
/fonts/wp-metro/WP-Metro.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/fonts/wp-metro/WP-Metro.ttf
--------------------------------------------------------------------------------
/RetiledSearch/RetiledSearch/RetiledSearch.pyproject:
--------------------------------------------------------------------------------
1 | {
2 | "files": ["main.py", "MainWindow.qml"]
3 | }
4 |
--------------------------------------------------------------------------------
/Scripts/retiledsearch.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=RetiledSearch
3 | Type=Application
4 | Exec=retiledsearch
--------------------------------------------------------------------------------
/RetiledCompositor/RetiledCompositor/RetiledSearch.pyproject:
--------------------------------------------------------------------------------
1 | {
2 | "files": ["main.py", "MainWindow.qml"]
3 | }
4 |
--------------------------------------------------------------------------------
/docs/images/search-app-about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/search-app-about.png
--------------------------------------------------------------------------------
/docs/images/search-prototype.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/search-prototype.png
--------------------------------------------------------------------------------
/docs/images/tiles-with-icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/tiles-with-icons.png
--------------------------------------------------------------------------------
/docs/images/working-on-icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/working-on-icons.png
--------------------------------------------------------------------------------
/docs/images/search-app-appbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/search-app-appbar.png
--------------------------------------------------------------------------------
/docs/images/all-apps-with-icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/all-apps-with-icons.png
--------------------------------------------------------------------------------
/docs/images/tiles-with-wallpaper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/tiles-with-wallpaper.png
--------------------------------------------------------------------------------
/docs/images/pin-to-start-contextmenu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/pin-to-start-contextmenu.png
--------------------------------------------------------------------------------
/docs/images/three-column-layout-test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/three-column-layout-test.png
--------------------------------------------------------------------------------
/docs/images/reference/small tile folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/reference/small tile folder.png
--------------------------------------------------------------------------------
/RetiledStart/RetiledStart/pages/wallpaper.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/RetiledStart/RetiledStart/pages/wallpaper.jpg
--------------------------------------------------------------------------------
/RetiledThemes/Retiled-Metro/Retiled-Metro.ini:
--------------------------------------------------------------------------------
1 | # TODO: Basically have this be a .desktop file but have
2 | # a list of available themes or something.
--------------------------------------------------------------------------------
/TestProjects/qt-cpp test/test2_en_US.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/docs/images/reference/just a medium-size tile folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/reference/just a medium-size tile folder.png
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/Assets/Logo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/WP8.1 app/WP8.1 app/Assets/Logo.scale-240.png
--------------------------------------------------------------------------------
/TestProjects/qt-cpp test/main.qml:
--------------------------------------------------------------------------------
1 | import QtQuick
2 |
3 | Window {
4 | width: 640
5 | height: 480
6 | visible: true
7 | title: qsTr("Hello World")
8 | }
9 |
--------------------------------------------------------------------------------
/RetiledStyles/ActionCenterTextOnlyButton.qml:
--------------------------------------------------------------------------------
1 | // This is for the buttons on the top-left and top-right underneath the Action buttons, which are CLEAR and ALL SETTINGS by default.
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/Assets/Logo.scale-240.png.bak:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/WP8.1 app/WP8.1 app/Assets/Logo.scale-240.png.bak
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/Assets/WideLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/WP8.1 app/WP8.1 app/Assets/WideLogo.scale-240.png
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/Assets/SmallLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/WP8.1 app/WP8.1 app/Assets/SmallLogo.scale-240.png
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/Assets/StoreLogo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/WP8.1 app/WP8.1 app/Assets/StoreLogo.scale-240.png
--------------------------------------------------------------------------------
/docs/images/reference/wide Live Tile preview in tile folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/reference/wide Live Tile preview in tile folder.png
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/Assets/SplashScreen.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/WP8.1 app/WP8.1 app/Assets/SplashScreen.scale-240.png
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/Assets/Square71x71Logo.scale-240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/WP8.1 app/WP8.1 app/Assets/Square71x71Logo.scale-240.png
--------------------------------------------------------------------------------
/docs/images/reference/wp-emulator-screenshot-at-100-percent-scale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/reference/wp-emulator-screenshot-at-100-percent-scale.png
--------------------------------------------------------------------------------
/docs/images/reference/medium Live Tile preview in medium tile folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/reference/medium Live Tile preview in medium tile folder.png
--------------------------------------------------------------------------------
/docs/images/reference/wp-emulator-allapps-screenshot-at-100-percent-scale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/reference/wp-emulator-allapps-screenshot-at-100-percent-scale.png
--------------------------------------------------------------------------------
/docs/images/reference/medium Live Tile preview in tile folder plus mini-tile flipping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/docs/images/reference/medium Live Tile preview in tile folder plus mini-tile flipping.png
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/StoreLogo.png
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrewNaylor/Retiled/HEAD/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Images/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/TestProjects/qt-cpp test/searcher.h:
--------------------------------------------------------------------------------
1 | #ifndef SEARCHER_H
2 | #define SEARCHER_H
3 |
4 | #include
5 |
6 | class searcher : public QObject
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit searcher(QObject *parent = nullptr);
11 |
12 | signals:
13 |
14 | public slots:
15 | void openUrl(QString searchTerm);
16 |
17 | };
18 |
19 | #endif // SEARCHER_H
20 |
--------------------------------------------------------------------------------
/icons/actions/README.md:
--------------------------------------------------------------------------------
1 | The ellipsis/"More", pin, and unpin SVG files originate from OpenClipart, so I don't think I should place a license or copyright on them restricting their usage. I think that just lets you do whatever you want with them, as long as it doesn't put anyone in harm's way, is legal, and abides by the licenses for the projects you're using them in.
2 |
3 | Please note, however, I did modify them for my uses, so they're not exactly the same as the original files.
4 |
--------------------------------------------------------------------------------
/docs/ytshorts-descriptions/RetiledStart-demo-2.md:
--------------------------------------------------------------------------------
1 | Note: this is just the main part of the description from the video in the filename and there wasn't much this time but I'm just archiving it anyway.
2 |
3 | Since the last video demo, tiles have improved significantly and an early All Apps list prototype has been added.
4 |
5 | Retiled GitHub repo:
6 | https://github.com/DrewNaylor/Retiled
7 |
8 | Previous demo:
9 | https://www.youtube.com/watch?v=NpUnrb1wC_8&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4&index=1
10 |
11 | Playlist:
12 | https://www.youtube.com/watch?v=NpUnrb1wC_8&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4
13 |
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 | Hello on Windows Phone!
13 |
14 |
15 |
--------------------------------------------------------------------------------
/TestProjects/qt-cpp test/searcher.cpp:
--------------------------------------------------------------------------------
1 | #include "searcher.h"
2 | #include
3 | #include
4 | #include
5 |
6 | searcher::searcher(QObject *parent) : QObject{parent}
7 | {
8 |
9 | }
10 |
11 | void searcher::openUrl(QString searchTerm) {
12 |
13 | // Runs a search on Bing for "Windows Phone".
14 | // I was lazy so I just looked at the SO
15 | // page for this even though I could've looked
16 | // for the docs:
17 | // https://stackoverflow.com/a/17896113
18 | // TODO: Escape the HTML.
19 | QDesktopServices::openUrl(QUrl("https://bing.com/?q=" + searchTerm));
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 | true/PM
12 | PerMonitorV2, PerMonitor
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/docs/ytshorts-descriptions/Avalonia-Xwayland-Phosh-bug-demonstration.md:
--------------------------------------------------------------------------------
1 | Note: this is just the main part of the description of the video in the filename and I abbreviated it so it may take longer to find.
2 |
3 | While testing my Retiled project on the PinePhone, I discovered a bug on Phosh where only the most recently-opened app will be responsive. Once that app closes, the previous app is responsive again. This may be due to how Xwayland is implemented on Phosh, as Avalonia currently doesn't support Wayland, and this bug doesn't seem to affect Plasma Mobile. It's also possible that this is just how Phosh handles multiple copies of one process running at once, in this case dotnet, though I can't easily test this theory as dotnet doesn't run when renamed to, say, netdot. I'd report this issue, but I don't know which project to report it to.
4 |
5 | I've described this issue on GitHub as well:
6 | https://github.com/DrewNaylor/Retiled/issues/38
7 |
--------------------------------------------------------------------------------
/RetiledSearch/where are the Avalonia-based files.md:
--------------------------------------------------------------------------------
1 | I've archived them under the "archive" folder. The files will be available under
2 | "archive/RetiledSearch" and "archive/libRetiledSearch" for now. They
3 | will be deleted after the Avalonia-based RetiledStart files are archived and replaced with QML-based
4 | ones. Before those are archived, another tag will be made for them. It's expected that the
5 | Avalonia-based projects will be deleted shortly after the first release of Retiled is published.
6 |
7 | Update: the folders have been deleted, but you can access the tags from here:
8 | https://github.com/DrewNaylor/Retiled/releases/tag/before-archiving-avalonia-based-retiledsearch
9 | and here:
10 | https://github.com/DrewNaylor/Retiled/releases/tag/before-archiving-avalonia-based-retiledstart
11 | These links are mainly for myself so I know where to look for the code at, since some of it will still be of use to me, mainly the yaml-related stuff.
12 |
--------------------------------------------------------------------------------
/RetiledStart/where are the Avalonia-based files.md:
--------------------------------------------------------------------------------
1 | I've archived them under the "archive" folder. The files will be available under
2 | "archive/RetiledStart" and "archive/libRetiledStart" for now. They
3 | will be deleted after determining that I don't need the code in the repo anymore,
4 | though I'll go through the main Avalonia-based RetiledStart files to see if I need
5 | anything anywhere else. libRetiledStart will probably remain in the archive as the
6 | YAML file-related code will be useful for guinget when I work on the sources manager
7 | app, so I'll keep that code in the archive.
8 |
9 | Update: the folders have been deleted, but you can access the tags from here:
10 | https://github.com/DrewNaylor/Retiled/releases/tag/before-archiving-avalonia-based-retiledsearch
11 | and here:
12 | https://github.com/DrewNaylor/Retiled/releases/tag/before-archiving-avalonia-based-retiledstart
13 | These links are mainly for myself so I know where to look for the code at, since some of it will still be of use to me, mainly the yaml-related stuff.
14 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 | using Microsoft.UI.Xaml.Controls;
3 | using Microsoft.UI.Xaml.Controls.Primitives;
4 | using Microsoft.UI.Xaml.Data;
5 | using Microsoft.UI.Xaml.Input;
6 | using Microsoft.UI.Xaml.Media;
7 | using Microsoft.UI.Xaml.Navigation;
8 | using System;
9 | using System.Collections.Generic;
10 | using System.IO;
11 | using System.Linq;
12 | using System.Runtime.InteropServices.WindowsRuntime;
13 | using Windows.Foundation;
14 | using Windows.Foundation.Collections;
15 |
16 | // To learn more about WinUI, the WinUI project structure,
17 | // and more about our project templates, see: http://aka.ms/winui-project-info.
18 |
19 | namespace RetiledWinUITests
20 | {
21 | ///
22 | /// An empty window that can be used on its own or navigated to within a Frame.
23 | ///
24 | public sealed partial class MainWindow : Window
25 | {
26 | public MainWindow()
27 | {
28 | this.InitializeComponent();
29 | }
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/MainPage.xaml.vb:
--------------------------------------------------------------------------------
1 | ' The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkID=391641
2 |
3 | '''
4 | ''' An empty page that can be used on its own or navigated to within a Frame.
5 | '''
6 | Public NotInheritable Class MainPage
7 | Inherits Page
8 |
9 | '''
10 | ''' Invoked when this page is about to be displayed in a Frame.
11 | '''
12 | ''' Event data that describes how this page was reached.
13 | ''' This parameter is typically used to configure the page.
14 | Protected Overrides Sub OnNavigatedTo(e As Navigation.NavigationEventArgs)
15 | ' TODO: Prepare the page for display here.
16 |
17 | ' TODO: If your application contains multiple pages, ensure that you are
18 | ' handling the hardware Back button by registering for the
19 | ' Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
20 | ' If you are using the NavigationHelper provided by some templates,
21 | ' this event is handled for you.
22 | End Sub
23 |
24 | End Class
25 |
--------------------------------------------------------------------------------
/LICENSE.PyYAML.MIT:
--------------------------------------------------------------------------------
1 | Copyright (c) 2017-2021 Ingy döt Net
2 | Copyright (c) 2006-2016 Kirill Simonov
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | this software and associated documentation files (the "Software"), to deal in
6 | the Software without restriction, including without limitation the rights to
7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | of the Software, and to permit persons to whom the Software is furnished to do
9 | so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | SOFTWARE.
21 |
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/My Project/AssemblyInfo.vb:
--------------------------------------------------------------------------------
1 | Imports System
2 | Imports System.Reflection
3 | Imports System.Runtime.InteropServices
4 |
5 | ' General Information about an assembly is controlled through the following
6 | ' set of attributes. Change these attribute values to modify the information
7 | ' associated with an assembly.
8 |
9 | ' Review the values of the assembly attributes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | ' Version information for an assembly consists of the following four values:
19 | '
20 | ' Major Version
21 | ' Minor Version
22 | ' Build Number
23 | ' Revision
24 | '
25 | ' You can specify all the values or you can default the Build and Revision Numbers
26 | ' by using the '*' as shown below:
27 | '
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/docs/ytshorts-descriptions/RetiledStart-demo-3.md:
--------------------------------------------------------------------------------
1 | Note: this is just the main part of the description in for the video in the filename.
2 |
3 | Some apps can now be launched from the All Apps list, and this video shows what it looks like in portrait mode. There are also some apps that can't yet run from the All Apps list, and I need to remove stuff like "%u" from their "Exec" key to make them work.
4 |
5 | It takes a while to start apps on the PinePhone, which might be partly why Plasma Mobile has a splash screen when you open stuff. I'll have to add one to RetiledStart if I figure out how to do it or someone else helps with it.
6 |
7 | Something else I should mention besides currently needing the scrollbar to scroll the list is that none of the apps display their "Name" key yet, so you either have to guess what an app is, or rotate the phone into landscape mode. I'll be showing this in a future video.
8 |
9 | Retiled GitHub repo:
10 | https://github.com/DrewNaylor/Retiled
11 |
12 | Previous demo:
13 | https://m.youtube.com/watch?v=GVt1WAN-w04&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4&index=2
14 |
15 | Playlist:
16 | https://www.youtube.com/watch?v=NpUnrb1wC_8&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4
17 |
--------------------------------------------------------------------------------
/docs/ytshorts-descriptions/RetiledStart-demo-1.md:
--------------------------------------------------------------------------------
1 | Note: this is just the main part of the description for the video in the filename.
2 |
3 | This is a demo of the prototype for RetiledStart running on the PinePhone. The tiles are supposed to be the same color as Windows Phone 8.x's "Cobalt", but I'm not sure if it's correct as Cobalt varied depending on the firmware and Avalonia might not be displaying it exactly like my Lumia 822 (and Lumia 830 on Lumia Denim, though not before that firmware version) did.
4 |
5 | Scrolling isn't available when dragging on the buttons like Windows Phone allowed, so I have to scroll in the sidebar. Hopefully I can figure that out or Avalonia adds an easy way to do that so it's as mechanically similar to WP as possible.
6 |
7 | There's also supposed to be three columns of large tiles visible, but that doesn't seem to be happening here, and that might just be due to how much room is available. Not sure if that's my fault, Avalonia, or Xwayland.
8 |
9 | Retiled project GitHub repo:
10 | https://github.com/DrewNaylor/Retiled
11 |
12 | Playlist:
13 | https://www.youtube.com/watch?v=NpUnrb1wC_8&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4
14 |
15 |
16 | Sorry about the background noise, I was working on backups.
17 |
--------------------------------------------------------------------------------
/docs/ytshorts-descriptions/RetiledActionCenter-demo-1.md:
--------------------------------------------------------------------------------
1 | Note: I only copied over the relevant part and left the boilerplate at the bottom there. The following is what's supposed to be in the description for the YouTube "Shorts" video in the filename.
2 |
3 | Tonight I decided to just start working on my Action Center implementation. The first Action Command is a toggle for the flashlight (something Windows Phone 8.1 never had as far as I know, and I always had to rely on a Hardware Tests secondary tile for the flashlight instead), and is thus easy to demo.
4 |
5 | You can toggle the flashlight as quickly as you want as long as the phone can handle it, but I didn't do that on camera because it's a seizure hazard. There is no other UI available to show yet, so I hope this is enough for now.
6 |
7 | For now there's no icon and the text is in the wrong spot, but those can be fixed easily.
8 |
9 | I got the flashlight-toggling commands from this page on megi's website: https://xnux.eu/devices/feature/flash-pp.html
10 |
11 | As always, the code is available in the repository:
12 | https://github.com/DrewNaylor/Retiled/tree/main/RetiledActionCenter
13 |
14 | Playlist:
15 | https://www.youtube.com/watch?v=NpUnrb1wC_8&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4
16 |
--------------------------------------------------------------------------------
/fonts/wp-metro/README.md:
--------------------------------------------------------------------------------
1 | (Note by Drew Naylor: These two files are only part of the WP-Metro font. You can find the rest here: https://github.com/ajtroxell/wp-metro)
2 |
3 | [WP METRO](http://wpmetro.ajtroxell.com/ "WP-Metro")
4 | ========
5 |
6 | A simple icon font inspired by the Windows Phone and Metro styles.
7 |
8 | View the icons and download the latest version at [WP-METRO](http://wpmetro.ajtroxell.com/)
9 |
10 | Licenses
11 | ------
12 |
13 | - The WP Metro font is licensed under [SIL OFL 1.1](http://scripts.sil.org/OFL)
14 | - No attribution is required but would be nice
15 | - `WP Metro by AJ Troxell - http://wpmetro.ajtroxell.com`
16 |
17 | Versioning
18 | ------
19 | WP Metro will be released and versioned in accordance with the Semantic Versioning guidelines, or at least i'll try.
20 |
21 | Releases will be numbered using the format of `..`
22 |
23 | And constructed with the following guidelines:
24 | - Breaking backward compatibility bumps the major (and resets the minor and patch)
25 | - New additions without breaking backward compatibility bumps the minor (and resets the patch)
26 | - Bug fixes and misc changes bumps the patch
27 |
28 | Myself
29 | ------
30 | - [email](mailto: aj@ajtroxell.com)
31 | - [twitter](https://twitter.com/AJTroxell)
32 | - [github](https://github.com/ajtroxell/)
--------------------------------------------------------------------------------
/clean-test-environment/clean/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 |
5 | // NOTE: When running this program, you need to
6 | // have the working directory be the source directory.
7 | // So what this means is, change the working directory
8 | // in Qt Creator's Projects>Build & Run>Run page to
9 | // be the folder that contains "main.cpp".
10 | // On Linux, if the build directory is "./build",
11 | // "cd" into the folder with "main.cpp", then do
12 | // "./build/appclean", or whatever the path to the
13 | // executable is. Otherwise, Qt can't find the
14 | // QML files correctly.
15 | // There will be a script that handles the working
16 | // directory properly in the future, and in fact,
17 | // the plan is to install the compiled binaries
18 | // in the same folders as the Python ones currently
19 | // get copied to.
20 |
21 | int main(int argc, char *argv[])
22 | {
23 | QGuiApplication app(argc, argv);
24 |
25 | QQmlApplicationEngine engine;
26 | const QUrl url(u"main.qml"_qs);
27 | QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
28 | &app, [url](QObject *obj, const QUrl &objUrl) {
29 | if (!obj && url == objUrl)
30 | QCoreApplication::exit(-1);
31 | }, Qt::QueuedConnection);
32 | engine.load(url);
33 |
34 | return app.exec();
35 | }
36 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | WinExe
4 | net5.0-windows10.0.19041.0
5 | 10.0.17763.0
6 | RetiledWinUITests
7 | app.manifest
8 | x86;x64;arm64
9 | win10-x86;win10-x64;win10-arm64
10 | true
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TestProjects/qt-cpp test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.16)
2 |
3 | project(test2 VERSION 0.1 LANGUAGES CXX)
4 |
5 | set(CMAKE_AUTOMOC ON)
6 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
7 |
8 | find_package(Qt6 6.2 COMPONENTS Quick REQUIRED)
9 |
10 | qt_add_executable(test2
11 | main.cpp
12 | searcher.cpp
13 | searcher.h
14 | )
15 |
16 | qt_add_qml_module(test2
17 | URI test2
18 | VERSION 1.0
19 | QML_FILES main.qml
20 | QML_FILES MainWindow.qml
21 | QML_FILES ./pages/About.qml
22 | )
23 |
24 | target_compile_definitions(test2
25 | PRIVATE $<$,$>:QT_QML_DEBUG>)
26 | target_link_libraries(test2
27 | PRIVATE Qt6::Quick)
28 |
29 | # NOTE: When running this program, you need to
30 | # have the working directory be the source directory.
31 | # So what this means is, change the working directory
32 | # in Qt Creator's Projects>Build & Run>Run page to
33 | # be the folder that contains "main.cpp".
34 | # On Linux, if the build directory is "./build",
35 | # "cd" into the folder with "main.cpp", then do
36 | # "./build/test2", or whatever the path to the
37 | # executable is. Otherwise, Qt can't find the
38 | # QML files correctly.
39 | # There will be a script that handles the working
40 | # directory properly in the future, and in fact,
41 | # the plan is to install the compiled binaries
42 | # in the same folders as the Python ones currently
43 | # get copied to.
44 |
--------------------------------------------------------------------------------
/clean-test-environment/clean/main.qml:
--------------------------------------------------------------------------------
1 | import QtQuick
2 | import QtQuick.Controls.Universal
3 | import "../../RetiledStyles" as RetiledStyles
4 |
5 | // NOTE: When running this program, you need to
6 | // have the working directory be the source directory.
7 | // So what this means is, change the working directory
8 | // in Qt Creator's Projects>Build & Run>Run page to
9 | // be the folder that contains "main.cpp".
10 | // On Linux, if the build directory is "./build",
11 | // "cd" into the folder with "main.cpp", then do
12 | // "./build/appclean", or whatever the path to the
13 | // executable is. Otherwise, Qt can't find the
14 | // QML files correctly.
15 | // There will be a script that handles the working
16 | // directory properly in the future, and in fact,
17 | // the plan is to install the compiled binaries
18 | // in the same folders as the Python ones currently
19 | // get copied to.
20 |
21 | ApplicationWindow {
22 | id: window
23 | width: 360
24 | height: 720
25 | visible: true
26 | title: qsTr("RetiledStart")
27 |
28 | Universal.theme: Universal.Dark
29 | // Property for setting Accent colors so that Universal.accent
30 | // can in turn be set easily at runtime.
31 | property string accentColor: "#0050ef"
32 | Universal.accent: accentColor
33 | Universal.foreground: 'white'
34 | // Fun fact: QML supports setting the background to transparent,
35 | // which shows all the other windows behind the app's window as you'd expect.
36 | // This will probably be useful when working on stuff like the volume controls and Action Center.
37 | Universal.background: 'black'
38 |
39 | RetiledStyles.Button {
40 | text: "test"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/docs/ytshorts-descriptions/RetiledSearch-demo-1.md:
--------------------------------------------------------------------------------
1 | Note: this is just the main part of the description of the video in the filename.
2 |
3 | Until now, RetiledSearch couldn't be used properly when running under Plasma Mobile, but I recently started working on a rewrite for the whole project to mostly QML/Python due to Avalonia seemingly lacking support for touch-activated context flyouts. To make things easier, I began with RetiledSearch, as I did originally with the Avalonia version.
4 |
5 | The main benefits of the rewrite (aside from being able to fully use the search app with touch) include much faster launch times, significantly reduced memory usage, and proper Wayland support so it doesn't look blurry.
6 |
7 | Currently the button's animations aren't working, so I'll have to figure out how to port them from Qt5 to Qt6 (I did a lot of the main work using my fork of the Qml.Net sample app as a QML file loader, and that program uses Qt5). The other major issue that's up to me to solve (the weird thing with backspacing after pressing the spacebar might just be a thing with the keyboard, since it's fine with a physical keyboard under Windows) is having the search bar stretch to the edge of the display when rotated.
8 |
9 | The Avalonia-based version will be archived once this one is good enough to replace it, as the code may be useful to some. If you'd like to run this program, there are some details at the bottom of this PR:
10 | https://github.com/DrewNaylor/Retiled/pull/49
11 |
12 | Retiled GitHub repo:
13 | https://github.com/DrewNaylor/Retiled
14 |
15 | Previous demo:
16 | https://m.youtube.com/watch?v=FGZ3E5nqb0s&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4&index=4
17 |
18 | Playlist:
19 | https://www.youtube.com/watch?v=NpUnrb1wC_8&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4
20 |
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | WP8.1 app
7 | Drew
8 | Assets\StoreLogo.png
9 |
10 |
11 | 6.3.1
12 | 6.3.1
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 | RetiledWinUITests (Package)
16 | Drew
17 | Images\StoreLogo.png
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 | using Microsoft.UI.Xaml.Controls;
3 | using Microsoft.UI.Xaml.Controls.Primitives;
4 | using Microsoft.UI.Xaml.Data;
5 | using Microsoft.UI.Xaml.Input;
6 | using Microsoft.UI.Xaml.Media;
7 | using Microsoft.UI.Xaml.Navigation;
8 | using Microsoft.UI.Xaml.Shapes;
9 | using System;
10 | using System.Collections.Generic;
11 | using System.IO;
12 | using System.Linq;
13 | using System.Runtime.InteropServices.WindowsRuntime;
14 | using Windows.ApplicationModel;
15 | using Windows.ApplicationModel.Activation;
16 | using Windows.Foundation;
17 | using Windows.Foundation.Collections;
18 |
19 | // To learn more about WinUI, the WinUI project structure,
20 | // and more about our project templates, see: http://aka.ms/winui-project-info.
21 |
22 | namespace RetiledWinUITests
23 | {
24 | ///
25 | /// Provides application-specific behavior to supplement the default Application class.
26 | ///
27 | public partial class App : Application
28 | {
29 | ///
30 | /// Initializes the singleton application object. This is the first line of authored code
31 | /// executed, and as such is the logical equivalent of main() or WinMain().
32 | ///
33 | public App()
34 | {
35 | this.InitializeComponent();
36 | }
37 |
38 | ///
39 | /// Invoked when the application is launched normally by the end user. Other entry points
40 | /// will be used such as when the application is launched to open a specific file.
41 | ///
42 | /// Details about the launch request and process.
43 | protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
44 | {
45 | m_window = new MainWindow();
46 | m_window.Activate();
47 | }
48 |
49 | private Window m_window;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WP8.1 app", "WP8.1 app\WP8.1 app.vbproj", "{4234DE73-BED6-426F-9F93-75A6C2A68946}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Debug|ARM = Debug|ARM
12 | Debug|x86 = Debug|x86
13 | Release|Any CPU = Release|Any CPU
14 | Release|ARM = Release|ARM
15 | Release|x86 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
21 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|ARM.ActiveCfg = Debug|ARM
22 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|ARM.Build.0 = Debug|ARM
23 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|ARM.Deploy.0 = Debug|ARM
24 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|x86.ActiveCfg = Debug|x86
25 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|x86.Build.0 = Debug|x86
26 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Debug|x86.Deploy.0 = Debug|x86
27 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|Any CPU.ActiveCfg = Release|Any CPU
28 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|Any CPU.Build.0 = Release|Any CPU
29 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|Any CPU.Deploy.0 = Release|Any CPU
30 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|ARM.ActiveCfg = Release|ARM
31 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|ARM.Build.0 = Release|ARM
32 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|ARM.Deploy.0 = Release|ARM
33 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|x86.ActiveCfg = Release|x86
34 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|x86.Build.0 = Release|x86
35 | {4234DE73-BED6-426F-9F93-75A6C2A68946}.Release|x86.Deploy.0 = Release|x86
36 | EndGlobalSection
37 | GlobalSection(SolutionProperties) = preSolution
38 | HideSolutionNode = FALSE
39 | EndGlobalSection
40 | EndGlobal
41 |
--------------------------------------------------------------------------------
/LICENSE_ForSpecifiedLibraries.MIT:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | libRetiledActionCenter: Copyright (C) 2022-2023 Drew Naylor
3 | libRetiledSettings: Copyright (C) 2022-2023 Drew Naylor
4 | libdotdesktop_py: Copyright (C) 2021-2023 Drew Naylor
5 | libRetiledStart: Copyright (C) 2021-2023 Drew Naylor
6 |
7 | // I have several files to list here.
8 | LicenseBlock: {
9 | // Apply copyright to all files in the files.fileList block,
10 | // including inner blocks.
11 | // These files are located in ./Scripts, as the code implies.
12 | files.dirPath: "./Scripts"
13 | files.copyright: "Copyright (C) 2021, 2023 Drew Naylor"
14 | files.fileList: {
15 | "build-retiledsearch.sh", "build-retiledstart.sh",
16 | "install-retiled.sh", "run-retiledsearch.sh",
17 | "run-retiledstart.sh", "uninstall-retiled.sh"
18 |
19 | // (not sure where to place it for these, but they
20 | // are under the MIT License with the copyright
21 | // specified for files.copyright)
22 | {
23 | "retiledsearch.desktop", "retiledstart.desktop"
24 | }
25 | }
26 |
27 | (I wish copyright didn't exist and thus licenses didn't need to exist, either.)
28 |
29 | Permission is hereby granted, free of charge,
30 | to any person obtaining a copy of this
31 | software and associated documentation files
32 | (the “Software”), to deal in the Software
33 | without restriction, including without
34 | limitation the rights to use, copy, modify,
35 | merge, publish, distribute, sublicense,
36 | and/or sell copies of the Software, and to
37 | permit persons to whom the Software is
38 | furnished to do so, subject to the following
39 | conditions:
40 |
41 | The above copyright notice and this permission
42 | notice shall be included in all copies or
43 | substantial portions of the Software.
44 |
45 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
46 | WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
47 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES
48 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
49 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
50 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
51 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
52 | WHETHER IN AN ACTION OF CONTRACT, TORT OR
53 | OTHERWISE, ARISING FROM, OUT OF OR IN
54 | CONNECTION WITH THE SOFTWARE OR THE USE OR
55 | OTHER DEALINGS IN THE SOFTWARE.
56 |
--------------------------------------------------------------------------------
/clean-test-environment/clean/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.20)
2 |
3 | project(clean VERSION 0.1 LANGUAGES CXX)
4 |
5 | set(CMAKE_AUTOMOC ON)
6 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
7 |
8 | find_package(Qt6 6.2 COMPONENTS Quick REQUIRED)
9 |
10 | qt_add_executable(appclean
11 | main.cpp
12 | )
13 |
14 | qt_add_qml_module(appclean
15 | URI clean
16 | VERSION 1.0
17 | QML_FILES main.qml
18 | )
19 |
20 | set_target_properties(appclean PROPERTIES
21 | MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
22 | MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
23 | MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
24 | MACOSX_BUNDLE TRUE
25 | WIN32_EXECUTABLE TRUE
26 | )
27 |
28 | target_compile_definitions(appclean
29 | PRIVATE $<$,$>:QT_QML_DEBUG>)
30 | target_link_libraries(appclean
31 | PRIVATE Qt6::Quick)
32 |
33 | # NOTE: This commented-out block probably won't work the way
34 | # I'm importing QML files, because Qt Creator says it's fine,
35 | # but the program can't find the files when it runs.
36 | # Maybe this is related to not having my QML files in a real
37 | # module and just being in a folder, I don't know.
38 |
39 | # Import RetiledStyles QML files.
40 | # Change these paths in your CMakeCache as necessary.
41 | # Got this code from:
42 | # https://stackoverflow.com/a/62202304
43 | # Directories where Qt Creator can find QML files.
44 | # (Not needed for builds, but makes Qt Creator code completion happy.)
45 | # Need to get the correct path:
46 | # https://stackoverflow.com/a/66305778
47 | # Actually, we need to run cmake_path as its own function:
48 | # https://cmake.org/cmake/help/v3.20/command/cmake_path.html#get-parent-path
49 | #set(sourcePath "${CMAKE_CURRENT_SOURCE_DIR}")
50 | #cmake_path(GET sourcePath PARENT_PATH sourceParent)
51 | #list(APPEND QML_IMPORT_PATH "${sourceParent}/styles")
52 |
53 | ## Prevent adding duplicate values at each run of CMake.
54 | #list(REMOVE_DUPLICATES QML_IMPORT_PATH)
55 |
56 | ## The variable is cached in ${BUILD_DIR}/CMakeCache.txt. We need FORCE to
57 | ## change it there immediately. Also, add a comment to the cache file.
58 | #set(QML_IMPORT_PATH ${QML_IMPORT_PATH}
59 | # CACHE STRING "Qt Creator 7.0.0 RetiledStyles import path"
60 | # FORCE
61 | #)
62 |
--------------------------------------------------------------------------------
/TestProjects/qt-cpp test/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include "searcher.h"
5 |
6 | #include
7 | #include
8 |
9 | #include
10 |
11 | int main(int argc, char *argv[])
12 | {
13 |
14 | // NOTE: When running this program, you need to
15 | // have the working directory be the source directory.
16 | // So what this means is, change the working directory
17 | // in Qt Creator's Projects>Build & Run>Run page to
18 | // be the folder that contains "main.cpp".
19 | // On Linux, if the build directory is "./build",
20 | // "cd" into the folder with "main.cpp", then do
21 | // "./build/test2", or whatever the path to the
22 | // executable is. Otherwise, Qt can't find the
23 | // QML files correctly.
24 | // There will be a script that handles the working
25 | // directory properly in the future, and in fact,
26 | // the plan is to install the compiled binaries
27 | // in the same folders as the Python ones currently
28 | // get copied to.
29 |
30 | // Create a Searcher to use to run the search.
31 | // This isn't very good, because this is a pointer
32 | // and it could leak memory if it needs to be accessed
33 | // somewhere else, but I don't think we're doing that
34 | // here.
35 | // Both this line and the context property I took and
36 | // modified from this video, but it's basically
37 | // boilerplate:
38 | // https://www.youtube.com/watch?v=Nma3c3YxsUo
39 | searcher *searchClass = new searcher;
40 |
41 | std::cout << "yo\n";
42 |
43 | QGuiApplication app(argc, argv);
44 |
45 | QTranslator translator;
46 | const QStringList uiLanguages = QLocale::system().uiLanguages();
47 | for (const QString &locale : uiLanguages) {
48 | const QString baseName = "test2_" + QLocale(locale).name();
49 | if (translator.load(":/i18n/" + baseName)) {
50 | app.installTranslator(&translator);
51 | break;
52 | }
53 | }
54 |
55 | QQmlApplicationEngine engine;
56 |
57 | // Connect the Searcher as a context property.
58 | engine.rootContext()->setContextProperty("searchClass", searchClass);
59 |
60 | const QUrl url(u"./MainWindow.qml"_qs);
61 | QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
62 | &app, [url](QObject *obj, const QUrl &objUrl) {
63 | if (!obj && url == objUrl)
64 | QCoreApplication::exit(-1);
65 | }, Qt::QueuedConnection);
66 | engine.load(url);
67 |
68 | return app.exec();
69 | }
70 |
--------------------------------------------------------------------------------
/Scripts/run-retiledsearch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # run-retiledsearch.sh - Launcher script for RetiledSearch, an app meant as part of Retiled
4 | # and will be like the Bing Search app on Windows Phone.
5 | # Retiled is a Windows Phone 8.x-like "desktop" environment
6 | # for (mainly) Linux phones. Will transition to being
7 | # either a Plasma Mobile fork or an alternate layout
8 | # for Plasma Mobile.
9 | # Copyright (C) 2021, 2023 Drew Naylor
10 | # (Note that the copyright years include the years left out by the hyphen.)
11 | # Windows Phone and all other related copyrights and trademarks are property
12 | # of Microsoft Corporation. All rights reserved.
13 | #
14 | # This file is a part of the Retiled project.
15 | # Neither Retiled nor Drew Naylor are associated with Microsoft
16 | # and Microsoft does not endorse Retiled.
17 | # Any other copyrights and trademarks belong to their
18 | # respective people and companies/organizations.
19 | #
20 | #
21 | # Licensed under the MIT License (the "License");
22 | # you may not use this file except in compliance with the License.
23 | #
24 | # The MIT License (MIT)
25 | # Copyright (C) 2021, 2023 Drew Naylor
26 | #
27 | # Permission is hereby granted, free of charge,
28 | # to any person obtaining a copy of this
29 | # software and associated documentation files
30 | # (the “Software”), to deal in the Software
31 | # without restriction, including without
32 | # limitation the rights to use, copy, modify,
33 | # merge, publish, distribute, sublicense,
34 | # and/or sell copies of the Software, and to
35 | # permit persons to whom the Software is
36 | # furnished to do so, subject to the following
37 | # conditions:
38 | #
39 | # The above copyright notice and this permission
40 | # notice shall be included in all copies or
41 | # substantial portions of the Software.
42 | #
43 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
44 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
45 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
46 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
47 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
48 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
49 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
50 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
51 | # OTHERWISE, ARISING FROM, OUT OF OR IN
52 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
53 | # OTHER DEALINGS IN THE SOFTWARE.
54 |
55 |
56 | cd /opt/Retiled/RetiledSearch/RetiledSearch
57 | python main.py
58 |
--------------------------------------------------------------------------------
/Scripts/run-retiledstart.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # run-retiledstart.sh - Launcher script for RetiledStart, an app meant as part of Retiled
4 | # and will be like the Start Screen on Windows Phone 8.1 Update 1
5 | # if I can figure out the folders.
6 | # Retiled is a Windows Phone 8.x-like "desktop" environment
7 | # for (mainly) Linux phones. Will transition to being
8 | # either a Plasma Mobile fork or an alternate layout
9 | # for Plasma Mobile.
10 | # Copyright (C) 2021, 2023 Drew Naylor
11 | # (Note that the copyright years include the years left out by the hyphen.)
12 | # Windows Phone and all other related copyrights and trademarks are property
13 | # of Microsoft Corporation. All rights reserved.
14 | #
15 | # This file is a part of the Retiled project.
16 | # Neither Retiled nor Drew Naylor are associated with Microsoft
17 | # and Microsoft does not endorse Retiled.
18 | # Any other copyrights and trademarks belong to their
19 | # respective people and companies/organizations.
20 | #
21 | #
22 | # Licensed under the MIT License (the "License");
23 | # you may not use this file except in compliance with the License.
24 | #
25 | # The MIT License (MIT)
26 | # Copyright (C) 2021, 2023 Drew Naylor
27 | #
28 | # Permission is hereby granted, free of charge,
29 | # to any person obtaining a copy of this
30 | # software and associated documentation files
31 | # (the “Software”), to deal in the Software
32 | # without restriction, including without
33 | # limitation the rights to use, copy, modify,
34 | # merge, publish, distribute, sublicense,
35 | # and/or sell copies of the Software, and to
36 | # permit persons to whom the Software is
37 | # furnished to do so, subject to the following
38 | # conditions:
39 | #
40 | # The above copyright notice and this permission
41 | # notice shall be included in all copies or
42 | # substantial portions of the Software.
43 | #
44 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
45 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
46 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
47 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
48 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
49 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
50 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
51 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
52 | # OTHERWISE, ARISING FROM, OUT OF OR IN
53 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
54 | # OTHER DEALINGS IN THE SOFTWARE.
55 |
56 |
57 | cd /opt/Retiled/RetiledStart/RetiledStart
58 | python main.py
59 |
--------------------------------------------------------------------------------
/docs/ytshorts-descriptions/RetiledCompositor-demo-1.md:
--------------------------------------------------------------------------------
1 | Note: I only copied the main part of the description from the YouTube "Shorts" video in the filename.
2 |
3 |
4 | Recently I decided to start working on the compositor, and I ended up using Qt's QtWayland library unless there's something better available. Unfortunately, that means this code is under the GPLv3 instead of something better, like the Apache License, Version 2.0.
5 |
6 | Due to it being so early on in the development process of this component, I decided to just try to pretty much use the overview compositor example with a few modifications, mainly adding the Start and Search buttons, and moving the "Toggle overview" button to the bottom-left where the Back button goes. I also copied the Ctrl+Alt+Backspace shortcut from another example to make it easier to go back to the terminal.
7 |
8 | While I probably should've shown running it from the terminal, the USB cable doesn't reach far enough for me to plug the dock in to use a keyboard, plus my keyboard is really big. The way I ran it was by first switching to an empty TTY and logging in, then I deleted the Wayland lock file from "/run/user/1002/wayland-0.lock" so Kwin didn't interfere. Then, I cd'd into the file with the Python script to run the compositor, and ran "python main.py -platform eglfs" so it would be a fullscreen root window for the rest of the windows.
9 |
10 | There are some major bugs that I need to work out of the overview compositor example, mainly that interacting with a window causes it to be impossible to go back to that window after going into multitasking (what I'm calling "overview"). (If I can figure out how to fix that, I'll make sure to re-license the fix under the BSD License that Qt uses for that example file so it can be easily used by anyone who wants to use it/the Qt project if there's a way to submit the change to them properly.) The buttons at the bottom also aren't in their own area, so they end up overlapping the windows. Another issue is that the scaling appears to be 100% for everything instead of 200% like it's supposed to be.
11 |
12 | (Update May 21, 2022: turns out that the issue where you can't return to a window after interacting with it was a Qt-related bug, as I did nothing but update my PinePhone and it works now. This is good because it means less for me to do.)
13 |
14 | One nice thing I noticed is that it seems really fast, except for how long it takes to open apps. I'm sure things will slow down once other stuff like support for notifications and the Action Center are integrated.
15 |
16 | If you'd like to check the code out for yourself, you can find it in this branch for now:
17 | https://github.com/DrewNaylor/Retiled/tree/qml-based-compositor/RetiledCompositor/RetiledCompositor
18 |
19 | Playlist:
20 | https://www.youtube.com/watch?v=NpUnrb1wC_8&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4
21 |
--------------------------------------------------------------------------------
/icons/actions/ellipsis_white.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
89 |
--------------------------------------------------------------------------------
/Scripts/uninstall-retiled.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # uninstall-retiled.sh - Uninstall script for Retiled,
4 | # a Windows Phone 8.x-like "desktop" environment
5 | # for (mainly) Linux phones. Will transition to being
6 | # either a Plasma Mobile fork or an alternate layout
7 | # for Plasma Mobile.
8 | # Copyright (C) 2021, 2023 Drew Naylor
9 | # (Note that the copyright years include the years left out by the hyphen.)
10 | # Windows Phone and all other related copyrights and trademarks are property
11 | # of Microsoft Corporation. All rights reserved.
12 | #
13 | # This file is a part of the Retiled project.
14 | # Neither Retiled nor Drew Naylor are associated with Microsoft
15 | # and Microsoft does not endorse Retiled.
16 | # Any other copyrights and trademarks belong to their
17 | # respective people and companies/organizations.
18 | #
19 | #
20 | # Licensed under the MIT License (the "License");
21 | # you may not use this file except in compliance with the License.
22 | #
23 | # The MIT License (MIT)
24 | # Copyright (C) 2021, 2023 Drew Naylor
25 | #
26 | # Permission is hereby granted, free of charge,
27 | # to any person obtaining a copy of this
28 | # software and associated documentation files
29 | # (the “Software”), to deal in the Software
30 | # without restriction, including without
31 | # limitation the rights to use, copy, modify,
32 | # merge, publish, distribute, sublicense,
33 | # and/or sell copies of the Software, and to
34 | # permit persons to whom the Software is
35 | # furnished to do so, subject to the following
36 | # conditions:
37 | #
38 | # The above copyright notice and this permission
39 | # notice shall be included in all copies or
40 | # substantial portions of the Software.
41 | #
42 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
43 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
44 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
45 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
46 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
47 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
48 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
49 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
50 | # OTHERWISE, ARISING FROM, OUT OF OR IN
51 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
52 | # OTHER DEALINGS IN THE SOFTWARE.
53 |
54 | # Just delete the /opt/Retiled dir for now.
55 | # TODO: Properly uninstall and don't delete anything I didn't add.
56 | sudo rm -rf /opt/Retiled
57 |
58 | # Delete the .desktop files we installed.
59 | sudo rm -f /usr/share/applications/retiledsearch.desktop
60 | sudo rm -f /usr/share/applications/retiledstart.desktop
61 |
62 | # Delete the scripts.
63 | sudo rm -f /usr/bin/retiledsearch
64 | sudo rm -f /usr/bin/retiledstart
65 |
66 | # Exit with code 0.
67 | exit 0
68 |
--------------------------------------------------------------------------------
/icons/actions/ellipsis.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
90 |
--------------------------------------------------------------------------------
/Scripts/build-retiledsearch.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # build-retiledsearch.sh - Build script for RetiledSearch, an app that's part of Retiled
4 | # and meant to be similar to the Bing Search app on Windows Phone.
5 | # Retiled is a Windows Phone 8.x-like "desktop" environment
6 | # for (mainly) Linux phones. Will transition to being
7 | # either a Plasma Mobile fork or an alternate layout
8 | # for Plasma Mobile.
9 | # Copyright (C) 2021, 2023 Drew Naylor
10 | # (Note that the copyright years include the years left out by the hyphen.)
11 | # Windows Phone, Bing, and all other related copyrights and trademarks are property
12 | # of Microsoft Corporation. All rights reserved.
13 | #
14 | # This file is a part of the Retiled project.
15 | # Neither Retiled nor Drew Naylor are associated with Microsoft
16 | # and Microsoft does not endorse Retiled.
17 | # Any other copyrights and trademarks belong to their
18 | # respective people and companies/organizations.
19 | #
20 | #
21 | # Licensed under the MIT License (the "License");
22 | # you may not use this file except in compliance with the License.
23 | #
24 | # The MIT License (MIT)
25 | # Copyright (C) 2021, 2023 Drew Naylor
26 | #
27 | # Permission is hereby granted, free of charge,
28 | # to any person obtaining a copy of this
29 | # software and associated documentation files
30 | # (the “Software”), to deal in the Software
31 | # without restriction, including without
32 | # limitation the rights to use, copy, modify,
33 | # merge, publish, distribute, sublicense,
34 | # and/or sell copies of the Software, and to
35 | # permit persons to whom the Software is
36 | # furnished to do so, subject to the following
37 | # conditions:
38 | #
39 | # The above copyright notice and this permission
40 | # notice shall be included in all copies or
41 | # substantial portions of the Software.
42 | #
43 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
44 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
45 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
46 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
47 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
48 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
49 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
50 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
51 | # OTHERWISE, ARISING FROM, OUT OF OR IN
52 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
53 | # OTHER DEALINGS IN THE SOFTWARE.
54 |
55 | # CD into the directory with the project.
56 | cd ../RetiledSearch/RetiledSearch
57 |
58 | # Start using compileall to build the Python scripts:
59 | # https://docs.python.org/3/library/compileall.html
60 | # https://stackoverflow.com/a/32686745
61 | python -m compileall -l .
62 |
63 | # Go back to the original dir.
64 | cd ../../Scripts
65 |
66 | # Exit with code 0.
67 | exit 0
68 |
--------------------------------------------------------------------------------
/RetiledStyles/TileBackgroundSolidColorRectangle.qml:
--------------------------------------------------------------------------------
1 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
2 | // Retiled project. Some code was copied from
3 | // the official qtdeclarative repo, which you can
4 | // access a copy of here:
5 | // https://github.com/DrewNaylor/qtdeclarative
6 | // Copyright (C) 2021-2023 Drew Naylor
7 | // (Note that the copyright years include the years left out by the hyphen.)
8 | // Windows Phone and all other related copyrights and trademarks are property
9 | // of Microsoft Corporation. All rights reserved.
10 | //
11 | // This file is a part of the RetiledStyles project, which is used by Retiled.
12 | // Neither Retiled nor Drew Naylor are associated with Microsoft
13 | // and Microsoft does not endorse Retiled.
14 | // Any other copyrights and trademarks belong to their
15 | // respective people and companies/organizations.
16 | //
17 | //
18 | // RetiledStyles is free software: you can redistribute it and/or modify
19 | // it under the terms of the GNU Lesser General Public License
20 | // version 3 as published by the Free Software Foundation.
21 | // All files in this repo (Retiled) licensed under the Apache License, 2.0,
22 | // are using RetiledStyles under the LGPLv3.
23 | //
24 | // Alternatively, this file may be used under the terms of the GNU
25 | // General Public License version 2.0 or later as published by the Free
26 | // Software Foundation and appearing in the file LICENSE.GPL included in
27 | // the packaging of this file. Please review the following information to
28 | // ensure the GNU General Public License version 2.0 requirements will be
29 | // met: http://www.gnu.org/licenses/gpl-2.0.html.
30 | //
31 | // This program is distributed in the hope that it will be useful,
32 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 | // GNU (Lesser) General Public License for more details.
35 | //
36 | // You should have received a copy of the GNU (Lesser) General Public License
37 | // along with this program. If not, see .
38 |
39 |
40 | import QtQuick
41 | Rectangle {
42 |
43 | // This is the regular tile background object/element,
44 | // with the solid color like WP7.x-8.0 before
45 | // tile background images were introduced in 8.1.
46 | // To see the code for the tile background images,
47 | // please open "TileBackgroundShaderEffectSource.qml".
48 |
49 | // Change tile color and stuff.
50 | color: tileBackgroundColor
51 | border.width: ThemeLoader.getValueFromTheme(themePath, "Tiles", "BorderWidth", "0")
52 | border.color: border.width > 0 ? ThemeLoader.getValueFromTheme(themePath, "Tiles", "BorderColor", "transparent") : "transparent"
53 | radius: ThemeLoader.getValueFromTheme(themePath, "Tiles", "Radius", "0")
54 |
55 | // Add antialiasing to tiles.
56 | // TODO: Allow buttons to have antialiasing turned
57 | // off, if desired by the user in the settings.
58 | antialiasing: true
59 | }
--------------------------------------------------------------------------------
/Scripts/build-retiledstart.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # build-retiledstart.sh - Build script for RetiledStart, an app meant as part of Retiled
4 | # and will be like the Start Screen on Windows Phone 8.1 Update 1
5 | # if I can figure out the folders.
6 | # Retiled is a Windows Phone 8.x-like "desktop" environment
7 | # for (mainly) Linux phones. Will transition to being
8 | # either a Plasma Mobile fork or an alternate layout
9 | # for Plasma Mobile.
10 | # Copyright (C) 2021, 2023 Drew Naylor
11 | # (Note that the copyright years include the years left out by the hyphen.)
12 | # Windows Phone and all other related copyrights and trademarks are property
13 | # of Microsoft Corporation. All rights reserved.
14 | #
15 | # This file is a part of the Retiled project.
16 | # Neither Retiled nor Drew Naylor are associated with Microsoft
17 | # and Microsoft does not endorse Retiled.
18 | # Any other copyrights and trademarks belong to their
19 | # respective people and companies/organizations.
20 | #
21 | #
22 | # Licensed under the MIT License (the "License");
23 | # you may not use this file except in compliance with the License.
24 | #
25 | # The MIT License (MIT)
26 | # Copyright (C) 2021, 2023 Drew Naylor
27 | #
28 | # Permission is hereby granted, free of charge,
29 | # to any person obtaining a copy of this
30 | # software and associated documentation files
31 | # (the “Software”), to deal in the Software
32 | # without restriction, including without
33 | # limitation the rights to use, copy, modify,
34 | # merge, publish, distribute, sublicense,
35 | # and/or sell copies of the Software, and to
36 | # permit persons to whom the Software is
37 | # furnished to do so, subject to the following
38 | # conditions:
39 | #
40 | # The above copyright notice and this permission
41 | # notice shall be included in all copies or
42 | # substantial portions of the Software.
43 | #
44 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
45 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
46 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
47 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
48 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
49 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
50 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
51 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
52 | # OTHERWISE, ARISING FROM, OUT OF OR IN
53 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
54 | # OTHER DEALINGS IN THE SOFTWARE.
55 |
56 | # CD into the directory with the project.
57 | cd ../RetiledStart/RetiledStart
58 |
59 | # Start using compileall to build the Python scripts:
60 | # https://docs.python.org/3/library/compileall.html
61 | # https://stackoverflow.com/a/32686745
62 | python -m compileall -l .
63 |
64 | # CD into the libs folder.
65 | cd ./libs
66 |
67 | # Compile the stuff in here.
68 | python -m compileall .
69 |
70 | # Go back to the original dir.
71 | cd ../../../Scripts
72 |
73 | # Exit with code 0.
74 | exit 0
75 |
--------------------------------------------------------------------------------
/RetiledStyles/RoundButton.qml:
--------------------------------------------------------------------------------
1 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
2 | // Retiled project. Some code was copied from
3 | // the official qtdeclarative repo, which you can
4 | // access a copy of here:
5 | // https://github.com/DrewNaylor/qtdeclarative
6 | // Copyright (C) 2021-2023 Drew Naylor
7 | // (Note that the copyright years include the years left out by the hyphen.)
8 | // Windows Phone and all other related copyrights and trademarks are property
9 | // of Microsoft Corporation. All rights reserved.
10 | //
11 | // This file is a part of the RetiledStyles project, which is used by Retiled.
12 | // Neither Retiled nor Drew Naylor are associated with Microsoft
13 | // and Microsoft does not endorse Retiled.
14 | // Any other copyrights and trademarks belong to their
15 | // respective people and companies/organizations.
16 | //
17 | //
18 | // RetiledStyles is free software: you can redistribute it and/or modify
19 | // it under the terms of the GNU Lesser General Public License
20 | // version 3 as published by the Free Software Foundation.
21 | // All files in this repo (Retiled) licensed under the Apache License, 2.0,
22 | // are using RetiledStyles under the LGPLv3.
23 | //
24 | // Alternatively, this file may be used under the terms of the GNU
25 | // General Public License version 2.0 or later as published by the Free
26 | // Software Foundation and appearing in the file LICENSE.GPL included in
27 | // the packaging of this file. Please review the following information to
28 | // ensure the GNU General Public License version 2.0 requirements will be
29 | // met: http://www.gnu.org/licenses/gpl-2.0.html.
30 | //
31 | // This program is distributed in the hope that it will be useful,
32 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 | // GNU (Lesser) General Public License for more details.
35 | //
36 | // You should have received a copy of the GNU (Lesser) General Public License
37 | // along with this program. If not, see .
38 |
39 | // Tried to do import ButtonBase but QML said
40 | // the style wasn't installed, so I'm just
41 | // importing everything in this folder
42 | // until I can figure out a better solution.
43 | // Also qualify the name to ensure there's
44 | // no clashing with QML.
45 | import "." as RetiledStyles
46 | import QtQuick
47 | import QtQuick.Controls.Universal
48 |
49 | RetiledStyles.Button {
50 | id: control
51 |
52 | // TODO: Figure out how to properly center buttons.
53 | // I may have to change this in ButtonBase.
54 |
55 | // Set button properties.
56 | borderRadius: ThemeLoader.getValueFromTheme(themePath, "RoundButtons", "RoundButtonCornerRadius", "90")
57 |
58 | // Some round buttons have to have their background
59 | // color set too, such as the tile editing ones.
60 | // unpressedBackgroundColor: "transparent"
61 |
62 | // Set the size to be small.
63 | buttonWidth: 32
64 | buttonHeight: 32
65 |
66 | // Set font size.
67 | fontSize: RetiledStyles.FontStyles.extrasmallFontSize
68 |
69 | // Get rid of padding.
70 | padding: 0
71 | verticalPadding: 0
72 | }
73 |
--------------------------------------------------------------------------------
/RetiledSettings/configs/accessibility.config:
--------------------------------------------------------------------------------
1 | # accessibility.config - Accessibility configuration settings for Retiled.
2 | # Windows Phone and all other related copyrights and trademarks are property
3 | # of Microsoft Corporation. All rights reserved to Microsoft for Microsoft's
4 | # copyrights and trademarks.
5 | #
6 | # This file is a part of the Retiled project.
7 | # Neither Retiled nor Drew Naylor are associated with Microsoft
8 | # and Microsoft does not endorse Retiled.
9 | # Any other copyrights and trademarks belong to their
10 | # respective people and companies/organizations.
11 | #
12 | #
13 | # Due to this file essentially being a configuration file, this file
14 | # may be used in any form for any purpose and is not restricted by
15 | # any license. If this paragraph results in this file being incompatible
16 | # with the license of a project you'd like to use it with,
17 | # then the MIT License applies to this file as follows:
18 | #
19 | # Copyright (C) 2022-2023 Drew Naylor
20 | #
21 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
22 | # documentation files (the “Software”), to deal in the Software without restriction, including without limitation
23 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
24 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions:
25 | #
26 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions
27 | # of the Software.
28 | #
29 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
30 | # TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
32 | # CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
33 | # IN THE SOFTWARE.
34 | #
35 |
36 | # This file is somewhat based on the .desktop file spec, but heavily modified.
37 |
38 |
39 |
40 | [Settings]
41 | # AllowParallax will allow you to turn off parallax scrolling
42 | # when using wallpapers. Please note that setting this to false
43 | # when using the in-tile wallpapers will shift the image up slightly,
44 | # otherwise there'll be a gap at the top.
45 | # Default is true.
46 | # Please note that this can't have quotes around it, or QML will be
47 | # really upset.
48 | AllowParallax=true
49 | # AllowTilt determines if elements such as buttons and tiles will "tilt"
50 | # toward the place they're being pressed in. In some cases, this could
51 | # potentially be annoying or bother someone, so it can be turned off.
52 | # Default is true. Please don't include quotes.
53 | AllowTilt=true
54 | # RetiledSettingsSchemaVersion determines which version of the config file
55 | # schema we're using. Please don't manually change this, unless you want to manually
56 | # add support for new settings not available in previous versions and you
57 | # want to be ready when the next version is available.
58 | RetiledSettingsSchemaVersion=0.1
--------------------------------------------------------------------------------
/RetiledStart/RetiledStart/libs/libRetiledStartPy/startlayout.yaml:
--------------------------------------------------------------------------------
1 | # startlayout.yaml - Default tile layout for RetiledStart.
2 | # Windows Phone and all other related copyrights and trademarks are property
3 | # of Microsoft Corporation. All rights reserved to Microsoft for Microsoft's
4 | # copyrights and trademarks.
5 | #
6 | # This file is a part of the Retiled project.
7 | # Neither Retiled nor Drew Naylor are associated with Microsoft
8 | # and Microsoft does not endorse Retiled.
9 | # Any other copyrights and trademarks belong to their
10 | # respective people and companies/organizations.
11 | #
12 | #
13 | # Due to this file essentially being a configuration file, this file
14 | # may be used in any form for any purpose and is not restricted by
15 | # any license. If this paragraph results in this file being incompatible
16 | # with the license of a project you'd like to use it with,
17 | # then the MIT License applies to this file as follows:
18 | #
19 | # Copyright (C) 2021-2023 Drew Naylor
20 | #
21 | # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
22 | # documentation files (the “Software”), to deal in the Software without restriction, including without limitation
23 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
24 | # to permit persons to whom the Software is furnished to do so, subject to the following conditions:
25 | #
26 | # The above copyright notice and this permission notice shall be included in all copies or substantial portions
27 | # of the Software.
28 | #
29 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
30 | # TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
32 | # CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
33 | # IN THE SOFTWARE.
34 | #
35 |
36 | # This file was partially based on the winget installer manifest spec.
37 | Tiles:
38 | - DotDesktopFilePath: org.kde.phone.dialer.desktop
39 | TileSize: medium
40 | - DotDesktopFilePath: org.kde.spacebar.desktop
41 | TileSize: medium
42 | - DotDesktopFilePath: org.kde.neochat.desktop
43 | TileSize: medium
44 | - DotDesktopFilePath: org.kde.angelfish.desktop
45 | TileSize: small
46 | - DotDesktopFilePath: org.kde.discover.desktop
47 | TileSize: small
48 | - DotDesktopFilePath: org.kde.phonebook.desktop
49 | TileSize: small
50 | - DotDesktopFilePath: org.kde.index.desktop
51 | TileSize: small
52 | - DotDesktopFilePath: org.kde.koko.desktop
53 | TileSize: medium
54 | - DotDesktopFilePath: org.postmarketos.Megapixels.desktop
55 | TileSize: medium
56 | - DotDesktopFilePath: org.kde.kalk.desktop
57 | TileSize: small
58 | - DotDesktopFilePath: org.kde.mobile.qmlkonsole.desktop
59 | TileSize: small
60 | - DotDesktopFilePath: org.kde.kweather.desktop
61 | TileSize: wide
62 | - DotDesktopFilePath: org.kde.calindori.desktop
63 | TileSize: medium
64 | - DotDesktopFilePath: org.kde.mobile.plasmasettings.desktop
65 | TileSize: medium
66 | StartLayoutSchemaVersion: 0.2
--------------------------------------------------------------------------------
/RetiledActionCenter/libs/libRetiledActionCenter/actioncentercommands.py:
--------------------------------------------------------------------------------
1 | # libRetiledActionCenter - Utility library for RetiledActionCenter that allows me to
2 | # keep the main code out of the UI code, like MVVM.
3 | # Copyright (C) 2022-2023 Drew Naylor
4 | # (Note that the copyright years include the years left out by the hyphen.)
5 | # (This file is based off RetiledStart, hence the copyright including 2021.)
6 | # Windows Phone and all other related copyrights and trademarks are property
7 | # of Microsoft Corporation. All rights reserved.
8 | #
9 | # This file is a part of the Retiled project.
10 | # Neither Retiled nor Drew Naylor are associated with Microsoft
11 | # and Microsoft does not endorse Retiled.
12 | # Any other copyrights and trademarks belong to their
13 | # respective people and companies/organizations.
14 | #
15 | #
16 | # Licensed under the MIT License (the "License");
17 | # you may not use this file except in compliance with the License.
18 | #
19 | # The MIT License (MIT)
20 | # Copyright (C) 2022-2023 Drew Naylor
21 | #
22 | # Permission is hereby granted, free of charge,
23 | # to any person obtaining a copy of this
24 | # software and associated documentation files
25 | # (the “Software”), to deal in the Software
26 | # without restriction, including without
27 | # limitation the rights to use, copy, modify,
28 | # merge, publish, distribute, sublicense,
29 | # and/or sell copies of the Software, and to
30 | # permit persons to whom the Software is
31 | # furnished to do so, subject to the following
32 | # conditions:
33 | #
34 | # The above copyright notice and this permission
35 | # notice shall be included in all copies or
36 | # substantial portions of the Software.
37 | #
38 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
39 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
40 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
41 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
42 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
43 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
44 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
46 | # OTHERWISE, ARISING FROM, OUT OF OR IN
47 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
48 | # OTHER DEALINGS IN THE SOFTWARE.
49 |
50 |
51 |
52 | import os
53 | import sys
54 | import json
55 | import subprocess
56 |
57 | def runCommand(commandName):
58 | # Run a command based on its name.
59 | # Flashlight commands were taken from this page:
60 | # https://xnux.eu/devices/feature/flash-pp.html#toc-pinephone-flash-led
61 | if commandName == "flashlight_on":
62 | if sys.platform.startswith("win32"):
63 | print("running on Windows; this won't work.")
64 | else:
65 | # Turn the flashlight on.
66 | # We have to use os.system instead:
67 | # https://stackabuse.com/executing-shell-commands-with-python
68 | os.system("echo 1 > /sys/class/leds/white:flash/brightness")
69 | print("commandName: " + commandName)
70 | if commandName == "flashlight_off":
71 | if sys.platform.startswith("win32"):
72 | print("running on Windows; this won't work.")
73 | else:
74 | # Turn the flashlight off.
75 | os.system("echo 0 > /sys/class/leds/white:flash/brightness")
76 | print("commandName: " + commandName)
77 |
--------------------------------------------------------------------------------
/docs/to-be-organized_extra-stuff-thatll-help.md:
--------------------------------------------------------------------------------
1 | Microsoft has a SystemD integration package that I'll have to use to make a service for Retiled to start up and show the login screen and stuff, though at first it'll probably just be a terminal window:
2 | https://devblogs.microsoft.com/dotnet/net-core-and-systemd/
3 | Actually, maybe instead of a terminal window, it could be a basic window with buttons that go 0-9, an Enter key, and a Backspace key. Those buttons would put text into a password textbox, which is then sent to whatever program unlocks the phone. Preferably it would just use the terminal and a real software keyboard temporarily, though.
4 |
5 | That's required for switching the UI as detailed here:
6 | https://wiki.mobian-project.org/doku.php?id=desktopenvironments
7 |
8 | Not sure how to handle non-SystemD distros yet, but there may be a way and I'll have to have a non-SystemD version of Retiled.
9 |
10 | Also not sure how to start X11 or Wayland from the service so that the UI is shown. Will have to look into that. Edit: this presentation may help out a bit, not sure:
11 | https://people.debian.org/~mpitt/systemd.conf-2016-graphical-session.pdf
12 |
13 | This page of the QML docs may be useful as a way to implement long-pressing buttons and opening context menus:
14 | https://doc.qt.io/qt-6/qml-qtquick-taphandler.html
15 |
16 | Qtile may be useful, as it's a tiling window manager written and configured in Python. Not sure how it would be useful, though. Actually, maybe it won't be useful, as I'd like people to be able to move windows around the screen when docked, so maybe I'll just use Kwin or something Qt-based until I can figure out something better or write something myself. Here's the link, anyway:
17 | https://github.com/qtile/qtile
18 |
19 | Python has a library that's used for reading INI files, so I'll probably be able to just use that if Python.NET doesn't end up supporting Python 3.9 and/or I decide that trying to get both it and .NET installed and running on phones just isn't worth it. I'll have to limit allowed comment characters and delimiters to be the same as what the desktop entry spec requires. It'll be a good idea to have this code be written in a way that's easy to reuse for other projects, as a library.
20 | https://docs.python.org/3/library/configparser.html
21 |
22 | I'm trying to use multiple .py file for each .qml file like .NET's code behinds, and even though this question and answer involves PyQt5, it may help:
23 | https://stackoverflow.com/questions/37974446/how-to-architect-a-pyqt5-project-using-qml-with-multiple-python-files
24 |
25 | I think I'll have to compile the Python code so it can be installed to a read-only folder, and Cython may help as described at these two pages:
26 | https://stackoverflow.com/questions/5105482/compile-main-python-program-using-cython/22040484#22040484
27 | https://stackoverflow.com/questions/11507101/how-to-compile-and-link-multiple-python-modules-or-packages-using-cython
28 |
29 | Here's a whole list of different types of tiles that are supported by Windows 8.x and Windows Phone 8.x, and this list may help add support for different tile templates/layouts:
30 | https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh761491(v=win.10)
31 |
32 | Never thought about short names for tiles, but MSDN mentions how you can add one in case the app's main display name would be too long for the tile. This would probably be handled with an `X-Retiled-ShortName` field:
33 | https://docs.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/creating-tiles
34 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31605.320
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "RetiledWinUITests (Package)", "RetiledWinUITests\RetiledWinUITests (Package)\RetiledWinUITests (Package).wapproj", "{E3BD77DE-09DC-4994-9252-74BF04DE2543}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RetiledWinUITests", "RetiledWinUITests\RetiledWinUITests\RetiledWinUITests.csproj", "{FBD53814-5652-4457-BA4D-7A6C3F6721BA}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|arm64 = Debug|arm64
13 | Debug|x64 = Debug|x64
14 | Debug|x86 = Debug|x86
15 | Release|arm64 = Release|arm64
16 | Release|x64 = Release|x64
17 | Release|x86 = Release|x86
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|arm64.ActiveCfg = Debug|arm64
21 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|arm64.Build.0 = Debug|arm64
22 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|arm64.Deploy.0 = Debug|arm64
23 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|x64.ActiveCfg = Debug|x64
24 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|x64.Build.0 = Debug|x64
25 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|x64.Deploy.0 = Debug|x64
26 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|x86.ActiveCfg = Debug|x86
27 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|x86.Build.0 = Debug|x86
28 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Debug|x86.Deploy.0 = Debug|x86
29 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|arm64.ActiveCfg = Release|arm64
30 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|arm64.Build.0 = Release|arm64
31 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|arm64.Deploy.0 = Release|arm64
32 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|x64.ActiveCfg = Release|x64
33 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|x64.Build.0 = Release|x64
34 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|x64.Deploy.0 = Release|x64
35 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|x86.ActiveCfg = Release|x86
36 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|x86.Build.0 = Release|x86
37 | {E3BD77DE-09DC-4994-9252-74BF04DE2543}.Release|x86.Deploy.0 = Release|x86
38 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Debug|arm64.ActiveCfg = Debug|arm64
39 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Debug|arm64.Build.0 = Debug|arm64
40 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Debug|x64.ActiveCfg = Debug|x64
41 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Debug|x64.Build.0 = Debug|x64
42 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Debug|x86.ActiveCfg = Debug|x86
43 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Debug|x86.Build.0 = Debug|x86
44 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Release|arm64.ActiveCfg = Release|arm64
45 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Release|arm64.Build.0 = Release|arm64
46 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Release|x64.ActiveCfg = Release|x64
47 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Release|x64.Build.0 = Release|x64
48 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Release|x86.ActiveCfg = Release|x86
49 | {FBD53814-5652-4457-BA4D-7A6C3F6721BA}.Release|x86.Build.0 = Release|x86
50 | EndGlobalSection
51 | GlobalSection(SolutionProperties) = preSolution
52 | HideSolutionNode = FALSE
53 | EndGlobalSection
54 | GlobalSection(ExtensibilityGlobals) = postSolution
55 | SolutionGuid = {D8B63AC1-FCAA-4E10-A7A1-C9424DBD52D7}
56 | EndGlobalSection
57 | EndGlobal
58 |
--------------------------------------------------------------------------------
/TestProjects/RetiledWinUITests/RetiledWinUITests/RetiledWinUITests (Package)/RetiledWinUITests (Package).wapproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 15.0
5 |
6 |
7 |
8 | Debug
9 | x86
10 |
11 |
12 | Release
13 | x86
14 |
15 |
16 | Debug
17 | x64
18 |
19 |
20 | Release
21 | x64
22 |
23 |
24 | Debug
25 | arm64
26 |
27 |
28 | Release
29 | arm64
30 |
31 |
32 |
33 | $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\
34 | RetiledWinUITests\
35 |
36 |
37 |
38 | e3bd77de-09dc-4994-9252-74bf04de2543
39 | 10.0.19041.0
40 | 10.0.18362.0
41 | net5.0-windows$(TargetPlatformVersion);$(AssetTargetFallback)
42 | en-US
43 | false
44 | ..\RetiledWinUITests\RetiledWinUITests.csproj
45 |
46 |
47 |
48 | Designer
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | True
63 | Properties\PublishProfiles\win10-$(Platform).pubxml
64 |
65 |
66 |
67 |
68 | build
69 |
70 |
71 | build
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/RetiledStyles/ContextMenu.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | **
3 | ** Copyright (C) 2017 The Qt Company Ltd.
4 | ** Contact: http://www.qt.io/licensing/
5 | **
6 | ** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
7 | **
8 | ** $QT_BEGIN_LICENSE:LGPL3$
9 | ** Commercial License Usage
10 | ** Licensees holding valid commercial Qt licenses may use this file in
11 | ** accordance with the commercial license agreement provided with the
12 | ** Software or, alternatively, in accordance with the terms contained in
13 | ** a written agreement between you and The Qt Company. For licensing terms
14 | ** and conditions see http://www.qt.io/terms-conditions. For further
15 | ** information use the contact form at http://www.qt.io/contact-us.
16 | **
17 | ** GNU Lesser General Public License Usage
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser
19 | ** General Public License version 3 as published by the Free Software
20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the
21 | ** packaging of this file. Please review the following information to
22 | ** ensure the GNU Lesser General Public License version 3 requirements
23 | ** will be met: https://www.gnu.org/licenses/lgpl.html.
24 | **
25 | ** GNU General Public License Usage
26 | ** Alternatively, this file may be used under the terms of the GNU
27 | ** General Public License version 2.0 or later as published by the Free
28 | ** Software Foundation and appearing in the file LICENSE.GPL included in
29 | ** the packaging of this file. Please review the following information to
30 | ** ensure the GNU General Public License version 2.0 requirements will be
31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html.
32 | **
33 | ** $QT_END_LICENSE$
34 | **
35 | ****************************************************************************/
36 |
37 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
38 | // Retiled project. Some code was copied from
39 | // the official qtdeclarative repo, which you can
40 | // access a copy of here:
41 | // https://github.com/DrewNaylor/qtdeclarative
42 | // Modifications to this file are Copyright (C) 2021-2023 Drew Naylor
43 | // and are overall licensed under the LGPLv3 and the GPLv2+ as described in
44 | // Qt's license block above, so you can choose which you use this under.
45 | // Any file in this repo (Retiled) that is licensed under the Apache License, 2.0, and
46 | // uses this file is using it under the LGPLv3.
47 | // Please refer to The Qt Company's copyrights above
48 | // for the copyrights to the original file.
49 | // (Note that the copyright years include the years left out by the hyphen.)
50 | // Windows Phone and all other related copyrights and trademarks are property
51 | // of Microsoft Corporation. All rights reserved.
52 | //
53 | // This file was modified from the original QtQuick Controls source.
54 | // In particular, I took code from the Universal style's "Popup.qml" file.
55 | // You can get a copy of the source from here:
56 | // https://github.com/DrewNaylor/qtdeclarative
57 | //
58 | // This file is a part of the RetiledStyles project, which is used by Retiled.
59 | // Neither Retiled nor Drew Naylor are associated with Microsoft
60 | // and Microsoft does not endorse Retiled.
61 | // Any other copyrights and trademarks belong to their
62 | // respective people and companies/organizations.
63 | //
64 | //
65 | // Please refer to the licensing info above for the licenses this file falls
66 | // under.
67 |
68 |
69 | import QtQuick
70 | import QtQuick.Templates as T
71 | import QtQuick.Controls.Universal
72 |
73 | T.Popup {
74 | id: control
75 |
76 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
77 | contentWidth + leftPadding + rightPadding)
78 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
79 | contentHeight + topPadding + bottomPadding)
80 |
81 | padding: 0
82 |
83 | background: Rectangle {
84 | color: ThemeLoader.getValueFromTheme(themePath, "ContextMenu", "BackgroundColor", "white")
85 | border.color: ThemeLoader.getValueFromTheme(themePath, "ContextMenu", "BorderColor", "black")
86 | border.width: ThemeLoader.getValueFromTheme(themePath, "ContextMenu", "BorderWidth", "2") // FlyoutBorderThemeThickness
87 | }
88 |
89 | T.Overlay.modal: Rectangle {
90 | color: "transparent"
91 | }
92 |
93 | T.Overlay.modeless: Rectangle {
94 | color: "transparent"
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/TestProjects/WP8.1 app/WP8.1 app/App.xaml.vb:
--------------------------------------------------------------------------------
1 | ' The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkID=391641
2 |
3 | '''
4 | ''' Provides application-specific behavior to supplement the default Application class.
5 | '''
6 | NotInheritable Class App
7 | Inherits Application
8 |
9 | Private _transitions As TransitionCollection
10 |
11 | '''
12 | ''' Initializes the singleton application object. This is the first line of authored code
13 | ''' executed, and as such is the logical equivalent of main() or WinMain().
14 | '''
15 | Public Sub New()
16 | InitializeComponent()
17 | End Sub
18 |
19 | '''
20 | ''' Invoked when the application is launched normally by the end user. Other entry points
21 | ''' will be used when the application is launched to open a specific file, to display
22 | ''' search results, and so forth.
23 | '''
24 | ''' Details about the launch request and process.
25 | Protected Overrides Sub OnLaunched(e As LaunchActivatedEventArgs)
26 | #If DEBUG Then
27 | If System.Diagnostics.Debugger.IsAttached Then
28 | DebugSettings.EnableFrameRateCounter = True
29 | End If
30 | #End If
31 |
32 | Dim rootFrame As Frame = TryCast(Window.Current.Content, Frame)
33 |
34 | ' Do not repeat app initialization when the Window already has content,
35 | ' just ensure that the window is active
36 | If rootFrame Is Nothing Then
37 | ' Create a Frame to act as the navigation context and navigate to the first page
38 | rootFrame = New Frame()
39 |
40 | ' TODO: change this value to a cache size that is appropriate for your application
41 | rootFrame.CacheSize = 1
42 |
43 | ' Set the default language
44 | rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages(0)
45 |
46 | If e.PreviousExecutionState = ApplicationExecutionState.Terminated Then
47 | ' TODO: Load state from previously suspended application
48 | End If
49 |
50 | ' Place the frame in the current Window
51 | Window.Current.Content = rootFrame
52 | End If
53 |
54 | If rootFrame.Content Is Nothing Then
55 | ' Removes the turnstile navigation for startup.
56 | If rootFrame.ContentTransitions IsNot Nothing Then
57 | _transitions = New TransitionCollection()
58 | For Each transition As Transition In rootFrame.ContentTransitions
59 | _transitions.Add(transition)
60 | Next
61 | End If
62 |
63 | rootFrame.ContentTransitions = Nothing
64 | AddHandler rootFrame.Navigated, AddressOf RootFrame_FirstNavigated
65 |
66 | ' When the navigation stack isn't restored navigate to the first page,
67 | ' configuring the new page by passing required information as a navigation
68 | ' parameter
69 | If Not rootFrame.Navigate(GetType(MainPage), e.Arguments) Then
70 | Throw New Exception("Failed to create initial page")
71 | End If
72 | End If
73 |
74 | ' Ensure the current window is active
75 | Window.Current.Activate()
76 | End Sub
77 |
78 | '''
79 | ''' Restores the content transitions after the app has launched.
80 | '''
81 | Private Sub RootFrame_FirstNavigated(sender As Object, e As NavigationEventArgs)
82 | Dim newTransitions As TransitionCollection
83 | If _transitions Is Nothing Then
84 | newTransitions = New TransitionCollection()
85 | newTransitions.Add(New NavigationThemeTransition())
86 | Else
87 | newTransitions = _transitions
88 | End If
89 |
90 | Dim rootFrame As Frame = DirectCast(sender, Frame)
91 | rootFrame.ContentTransitions = newTransitions
92 | RemoveHandler rootFrame.Navigated, AddressOf RootFrame_FirstNavigated
93 | End Sub
94 |
95 | '''
96 | ''' Invoked when application execution is being suspended.Application state is saved
97 | ''' without knowing whether the application will be terminated or resumed with the contents
98 | ''' of memory still intact.
99 | '''
100 | Private Sub OnSuspending(sender As Object, e As SuspendingEventArgs) Handles Me.Suspending
101 | Dim deferral As SuspendingDeferral = e.SuspendingOperation.GetDeferral()
102 |
103 | ' TODO: Save application state and stop any background activity
104 | deferral.Complete()
105 | End Sub
106 |
107 | End Class
108 |
--------------------------------------------------------------------------------
/fonts/wp-metro/OFL.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) , (),
2 | with Reserved Font Name .
3 | Copyright (c) , (),
4 | with Reserved Font Name .
5 | Copyright (c) , ().
6 |
7 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
8 | This license is copied below, and is also available with a FAQ at:
9 | http://scripts.sil.org/OFL
10 |
11 |
12 | -----------------------------------------------------------
13 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
14 | -----------------------------------------------------------
15 |
16 | PREAMBLE
17 | The goals of the Open Font License (OFL) are to stimulate worldwide
18 | development of collaborative font projects, to support the font creation
19 | efforts of academic and linguistic communities, and to provide a free and
20 | open framework in which fonts may be shared and improved in partnership
21 | with others.
22 |
23 | The OFL allows the licensed fonts to be used, studied, modified and
24 | redistributed freely as long as they are not sold by themselves. The
25 | fonts, including any derivative works, can be bundled, embedded,
26 | redistributed and/or sold with any software provided that any reserved
27 | names are not used by derivative works. The fonts and derivatives,
28 | however, cannot be released under any other type of license. The
29 | requirement for fonts to remain under this license does not apply
30 | to any document created using the fonts or their derivatives.
31 |
32 | DEFINITIONS
33 | "Font Software" refers to the set of files released by the Copyright
34 | Holder(s) under this license and clearly marked as such. This may
35 | include source files, build scripts and documentation.
36 |
37 | "Reserved Font Name" refers to any names specified as such after the
38 | copyright statement(s).
39 |
40 | "Original Version" refers to the collection of Font Software components as
41 | distributed by the Copyright Holder(s).
42 |
43 | "Modified Version" refers to any derivative made by adding to, deleting,
44 | or substituting -- in part or in whole -- any of the components of the
45 | Original Version, by changing formats or by porting the Font Software to a
46 | new environment.
47 |
48 | "Author" refers to any designer, engineer, programmer, technical
49 | writer or other person who contributed to the Font Software.
50 |
51 | PERMISSION & CONDITIONS
52 | Permission is hereby granted, free of charge, to any person obtaining
53 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
54 | redistribute, and sell modified and unmodified copies of the Font
55 | Software, subject to the following conditions:
56 |
57 | 1) Neither the Font Software nor any of its individual components,
58 | in Original or Modified Versions, may be sold by itself.
59 |
60 | 2) Original or Modified Versions of the Font Software may be bundled,
61 | redistributed and/or sold with any software, provided that each copy
62 | contains the above copyright notice and this license. These can be
63 | included either as stand-alone text files, human-readable headers or
64 | in the appropriate machine-readable metadata fields within text or
65 | binary files as long as those fields can be easily viewed by the user.
66 |
67 | 3) No Modified Version of the Font Software may use the Reserved Font
68 | Name(s) unless explicit written permission is granted by the corresponding
69 | Copyright Holder. This restriction only applies to the primary font name as
70 | presented to the users.
71 |
72 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
73 | Software shall not be used to promote, endorse or advertise any
74 | Modified Version, except to acknowledge the contribution(s) of the
75 | Copyright Holder(s) and the Author(s) or with their explicit written
76 | permission.
77 |
78 | 5) The Font Software, modified or unmodified, in part or in whole,
79 | must be distributed entirely under this license, and must not be
80 | distributed under any other license. The requirement for fonts to
81 | remain under this license does not apply to any document created
82 | using the Font Software.
83 |
84 | TERMINATION
85 | This license becomes null and void if any of the above conditions are
86 | not met.
87 |
88 | DISCLAIMER
89 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
90 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
91 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
92 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
93 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
94 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
95 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
96 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
97 | OTHER DEALINGS IN THE FONT SOFTWARE.
98 |
--------------------------------------------------------------------------------
/Scripts/install-retiled.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # install-retiled.sh - Install script for Retiled,
4 | # a Windows Phone 8.x-like "desktop" environment
5 | # for (mainly) Linux phones. Will transition to being
6 | # either a Plasma Mobile fork or an alternate layout
7 | # for Plasma Mobile.
8 | # Copyright (C) 2021, 2023 Drew Naylor
9 | # (Note that the copyright years include the years left out by the hyphen.)
10 | # Windows Phone and all other related copyrights and trademarks are property
11 | # of Microsoft Corporation. All rights reserved.
12 | #
13 | # This file is a part of the Retiled project.
14 | # Neither Retiled nor Drew Naylor are associated with Microsoft
15 | # and Microsoft does not endorse Retiled.
16 | # Any other copyrights and trademarks belong to their
17 | # respective people and companies/organizations.
18 | #
19 | #
20 | # Licensed under the MIT License (the "License");
21 | # you may not use this file except in compliance with the License.
22 | #
23 | # The MIT License (MIT)
24 | # Copyright (C) 2021, 2023 Drew Naylor
25 | #
26 | # Permission is hereby granted, free of charge,
27 | # to any person obtaining a copy of this
28 | # software and associated documentation files
29 | # (the “Software”), to deal in the Software
30 | # without restriction, including without
31 | # limitation the rights to use, copy, modify,
32 | # merge, publish, distribute, sublicense,
33 | # and/or sell copies of the Software, and to
34 | # permit persons to whom the Software is
35 | # furnished to do so, subject to the following
36 | # conditions:
37 | #
38 | # The above copyright notice and this permission
39 | # notice shall be included in all copies or
40 | # substantial portions of the Software.
41 | #
42 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
43 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
44 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
45 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
46 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
47 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
48 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
49 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
50 | # OTHERWISE, ARISING FROM, OUT OF OR IN
51 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
52 | # OTHER DEALINGS IN THE SOFTWARE.
53 |
54 | # CD into ./Scripts.
55 | # I think it would be easier to require a manual cd into Scripts, so this is
56 | # uncommented until I find out an easy way to check if we're in here or not.
57 | #cd ./Scripts
58 |
59 | # Run the build scripts.
60 | sh ./build-retiledsearch.sh
61 | sh ./build-retiledstart.sh
62 |
63 | # We have to copy dirs recursively:
64 | # https://www.decodingdevops.com/copy-directory-in-linux-recursive-copy-in-linux/
65 | cd ..
66 | # Make directories first.
67 | # We have to use "-p" to make missing intermediate dirs:
68 | # https://unix.stackexchange.com/a/588680
69 | # TODO: Make sure they don't exist before creating them.
70 | # Make styles dir.
71 | sudo mkdir -p /opt/Retiled/RetiledStyles
72 | # Make fonts dir.
73 | sudo mkdir -p /opt/Retiled/fonts
74 | # Make icons dir.
75 | sudo mkdir -p /opt/Retiled/icons
76 | # Make dirs for the programs themselves.
77 | sudo mkdir -p /opt/Retiled/RetiledSearch
78 | sudo mkdir -p /opt/Retiled/RetiledStart
79 | # Make dir for RetiledSettings, including the config files.
80 | # Guess I should include the library for future-proofing.
81 | # But for now I won't compile the settings library
82 | # as it's not being used by anything in ./RetiledSettings.
83 | # TODO: Add RetiledSettings stuff to the build scripts
84 | # when there's a settings app added.
85 | sudo mkdir -p /opt/Retiled/RetiledSettings
86 | # Now we can copy stuff.
87 | # Copy styles dir.
88 | sudo cp -rv ./RetiledStyles/* /opt/Retiled/RetiledStyles
89 | # Copy fonts dir.
90 | sudo cp -rv ./fonts/* /opt/Retiled/fonts
91 | # Copy icons.
92 | sudo cp -rv ./icons/* /opt/Retiled/icons
93 | # Now copy the programs.
94 | sudo cp -rv ./RetiledSearch/* /opt/Retiled/RetiledSearch
95 | sudo cp -rv ./RetiledStart/* /opt/Retiled/RetiledStart
96 | # Copy settings stuff.
97 | sudo cp -rv ./RetiledSettings/* /opt/Retiled/RetiledSettings
98 |
99 | # Copy license files, just to be safe.
100 | sudo sudo cp -v ./LICENSE* /opt/Retiled
101 |
102 | # Copy the .desktop files.
103 | sudo cp -v ./Scripts/retiledsearch.desktop /usr/share/applications
104 | sudo cp -v ./Scripts/retiledstart.desktop /usr/share/applications
105 |
106 | # Mark the scripts as executable.
107 | chmod +x ./Scripts/run-retiledsearch.sh
108 | chmod +x ./Scripts/run-retiledstart.sh
109 |
110 | # Copy the scripts to run everything.
111 | sudo cp -v ./Scripts/run-retiledsearch.sh /usr/bin/retiledsearch
112 | sudo cp -v ./Scripts/run-retiledstart.sh /usr/bin/retiledstart
113 |
114 | # Exit with code 0.
115 | exit 0
116 |
--------------------------------------------------------------------------------
/docs/ytshorts-descriptions/RetiledStart-demo-5.md:
--------------------------------------------------------------------------------
1 | Note: this is just the main part of the description for the YouTube "Shorts" video in the filename.
2 |
3 | Since the last video demo, I've had to move to QML as Avalonia didn't support opening context menus on touchscreens via long-press, at least in any way I could find. Aside from being a lot faster, using less memory, and working correctly under Wayland instead of using Xwayland, it's now possible to swipe anywhere on the tiles or All Apps list items, just by using QML's Flickable.
4 |
5 | Other notable progress since last time includes:
6 | - Properly sorting and displaying app names using the "Name" key in the .desktop files
7 | - Loading the tiles list from a config file in the user's home folder at "~/.config/Retiled/RetiledStart/startlayout-modified.yaml" (or a built-in file if the modified one doesn't exist) when starting
8 | - Saving tiles list changes in one of three ways: tapping a tile to exit "global edit mode" once you're done unpinning or resizing tiles (haven't figured out how to get it so you can tap anywhere outside the tiles to exit "global edit mode" yet), unpinning all the tiles so it goes to the All Apps list and keeps you there like Windows Phone, or pinning a tile (note that you have to exit "global edit mode" before you can go to the All Apps list)
9 | - Custom colors for pinned tiles if you modify the start layout config file, though please note that unpinning a tile will lose your color changes
10 | - Launching apps from their tiles
11 | - Each app now has its "Exec" key in its .desktop file cleaned (stuff like "%u" is removed, for example), so you should be able to open any app that shows up in the All Apps list now, though some aren't meant to show up, and I did find a file in a Plasma Mobile repo that said which .desktop files shouldn't be shown; unfortunately, those .desktop files don't have "NoDisplay = true", so there's not really any good way for me to hide them as I'm not trying to make an environment that prefers to show or hide apps from any particular other environment
12 | - Icons that are close enough to the original WP versions have been added for the All Apps button, Search button (not implemented yet, but it'd look weird without it there), resize button, and unpin button. The unpin button was modified from clipart on Open Clipart, and the rest were from the "wp-metro" icon font. Not exactly sure how to make the icon font's images be in the actual center of the buttons so they're not slightly off-center, but I tried.
13 | - Text is now using Open Sans, with a slightly decreased space between the characters to sorta emulate Segoe WP/Segoe UI.
14 | - Tiles have their text clipped off the end properly
15 | - QML's SwipeView allows swiping between the tiles list and the All Apps list, as expected
16 | - Entering "global edit mode" makes the tiles you didn't long-press on smaller and 50% opaque. Additionally, tapping another tile while in this state will give it edit buttons and hide the edit buttons on the tile that was previously being edited (in "local edit mode"), along with setting that last tile to be smaller and 50% opaque, while the new one is scaled to full-size and 100% opaque.
17 |
18 | There are some major issues right now, particularly that long-pressing on a tile not in "local edit mode" while in "global edit mode" will cause multiple tiles to be in "local edit mode" with edit buttons at once. This is easy to fix, I just need to add more to the long-press code. I also need to add a scrollbar back to the All Apps list, but it might not look quite right in the first version since I want it to be out soon.
19 |
20 | Please see my pinned comment for more information regarding issues and stuff I haven't figured out yet.
21 |
22 | Retiled GitHub repo:
23 | https://github.com/DrewNaylor/Retiled
24 |
25 | Previous demo:
26 | https://m.youtube.com/watch?v=FGZ3E5nqb0s&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4&index=4
27 |
28 | Playlist:
29 | https://www.youtube.com/watch?v=NpUnrb1wC_8&list=PLW6PgvLJvzAP2g_vueYX6xjhufjZyWj_4
30 |
31 | ---
32 |
33 | Pinned comment:
34 |
35 | More stuff from the description:
36 | I still haven't figured out how to get the small tiles to go on both rows beside a medium tile. I have one idea, but it might not work, and I haven't found anything about masonry layouts in QML as far as I remember. Haven't experimented with moving tiles yet, but that should be doable with work. Icons aren't supported yet, either, but I kinda know how to do it, even though it won't be supported in v0.1-DP1.
37 |
38 | One major issue is that unpinning all the tiles then pinning some more will cause all of them to be underneath the first tile in a column, which may be caused by using a Column layout to hold the tiles and the All Apps button, along with various spacer items. Maybe a Grid layout would fix it, but I want to wait for now. A workaround is to resize any tile to wide then medium and exit "global edit mode" so the layout fixes itself.
39 |
40 | I also don't have any animations yet except for when going between the tiles and All Apps lists.
41 |
42 | The "pin to start" button also doesn't have proper spacing on the left either, but I think I'll wait to add that since it's just one more thing, and I want this to be out soon as I said before.
43 |
--------------------------------------------------------------------------------
/RetiledStyles/AppBarMoreButton.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | **
3 | ** Copyright (C) 2017 The Qt Company Ltd.
4 | ** Contact: http://www.qt.io/licensing/
5 | **
6 | ** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
7 | **
8 | ** $QT_BEGIN_LICENSE:LGPL3$
9 | ** Commercial License Usage
10 | ** Licensees holding valid commercial Qt licenses may use this file in
11 | ** accordance with the commercial license agreement provided with the
12 | ** Software or, alternatively, in accordance with the terms contained in
13 | ** a written agreement between you and The Qt Company. For licensing terms
14 | ** and conditions see http://www.qt.io/terms-conditions. For further
15 | ** information use the contact form at http://www.qt.io/contact-us.
16 | **
17 | ** GNU Lesser General Public License Usage
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser
19 | ** General Public License version 3 as published by the Free Software
20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the
21 | ** packaging of this file. Please review the following information to
22 | ** ensure the GNU Lesser General Public License version 3 requirements
23 | ** will be met: https://www.gnu.org/licenses/lgpl.html.
24 | **
25 | ** GNU General Public License Usage
26 | ** Alternatively, this file may be used under the terms of the GNU
27 | ** General Public License version 2.0 or later as published by the Free
28 | ** Software Foundation and appearing in the file LICENSE.GPL included in
29 | ** the packaging of this file. Please review the following information to
30 | ** ensure the GNU General Public License version 2.0 requirements will be
31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html.
32 | **
33 | ** $QT_END_LICENSE$
34 | **
35 | ****************************************************************************/
36 |
37 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
38 | // Retiled project. Some code was copied from
39 | // the official qtdeclarative repo, which you can
40 | // access a copy of here:
41 | // https://github.com/DrewNaylor/qtdeclarative
42 | // Modifications to this file are Copyright (C) 2021-2023 Drew Naylor
43 | // and are overall licensed under the LGPLv3 and the GPLv2+ as described in
44 | // Qt's license block above, so you can choose which you use this under.
45 | // Any file in this repo (Retiled) that is licensed under the Apache License, 2.0, and
46 | // uses this file is using it under the LGPLv3.
47 | // Please refer to The Qt Company's copyrights above
48 | // for the copyrights to the original file.
49 | // (Note that the copyright years include the years left out by the hyphen.)
50 | // Windows Phone and all other related copyrights and trademarks are property
51 | // of Microsoft Corporation. All rights reserved.
52 | //
53 | // This file was modified from the original QtQuick Controls source.
54 | // In particular, I took code from the Universal style's "ToolButton.qml" file.
55 | // You can get a copy of the source from here:
56 | // https://github.com/DrewNaylor/qtdeclarative
57 | //
58 | // This file is a part of the RetiledStyles project, which is used by Retiled.
59 | // Neither Retiled nor Drew Naylor are associated with Microsoft
60 | // and Microsoft does not endorse Retiled.
61 | // Any other copyrights and trademarks belong to their
62 | // respective people and companies/organizations.
63 | //
64 | //
65 | // Please refer to the licensing info above for the licenses this file falls
66 | // under.
67 |
68 |
69 | import QtQuick
70 | import QtQuick.Templates as T
71 | import QtQuick.Controls.impl
72 | import QtQuick.Controls.Universal
73 |
74 | T.ToolButton {
75 | id: control
76 |
77 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
78 | implicitContentWidth + leftPadding + rightPadding)
79 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
80 | implicitContentHeight + topPadding + bottomPadding)
81 |
82 | padding: 6
83 | spacing: 8
84 |
85 | icon.width: 20
86 | icon.height: 20
87 | icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
88 |
89 | property bool useSystemFocusVisuals: true
90 |
91 | contentItem: IconLabel {
92 | spacing: control.spacing
93 | mirrored: control.mirrored
94 | display: control.display
95 |
96 | icon: control.icon
97 | text: control.text
98 | font: control.font
99 | color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
100 | }
101 |
102 | background: Rectangle {
103 | implicitWidth: 68
104 | implicitHeight: 48 // AppBarThemeCompactHeight
105 |
106 | color: control.enabled && (control.highlighted || control.checked) ? control.Universal.accent : "transparent"
107 |
108 | Rectangle {
109 | width: parent.width
110 | height: parent.height
111 | visible: control.down || control.hovered
112 | color: "transparent"
113 | }
114 | }
115 | }
116 |
--------------------------------------------------------------------------------
/RetiledStyles/FontStyles.qml:
--------------------------------------------------------------------------------
1 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
2 | // Retiled project. Some code was copied from
3 | // the official qtdeclarative repo, which you can
4 | // access a copy of here:
5 | // https://github.com/DrewNaylor/qtdeclarative
6 | // Copyright (C) 2021-2023 Drew Naylor
7 | // (Note that the copyright years include the years left out by the hyphen.)
8 | // Windows Phone and all other related copyrights and trademarks are property
9 | // of Microsoft Corporation. All rights reserved.
10 | //
11 | // This file is a part of the RetiledStyles project, which is used by Retiled.
12 | // Neither Retiled nor Drew Naylor are associated with Microsoft
13 | // and Microsoft does not endorse Retiled.
14 | // Any other copyrights and trademarks belong to their
15 | // respective people and companies/organizations.
16 | //
17 | //
18 | // RetiledStyles is free software: you can redistribute it and/or modify
19 | // it under the terms of the GNU Lesser General Public License
20 | // version 3 as published by the Free Software Foundation.
21 | // All files in this repo (Retiled) licensed under the Apache License, 2.0,
22 | // are using RetiledStyles under the LGPLv3.
23 | //
24 | // Alternatively, this file may be used under the terms of the GNU
25 | // General Public License version 2.0 or later as published by the Free
26 | // Software Foundation and appearing in the file LICENSE.GPL included in
27 | // the packaging of this file. Please review the following information to
28 | // ensure the GNU General Public License version 2.0 requirements will be
29 | // met: http://www.gnu.org/licenses/gpl-2.0.html.
30 | //
31 | // This program is distributed in the hope that it will be useful,
32 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 | // GNU (Lesser) General Public License for more details.
35 | //
36 | // You should have received a copy of the GNU (Lesser) General Public License
37 | // along with this program. If not, see .
38 |
39 | // This file has font data that we'll use in the apps so they don't
40 | // have to be hardcoded everywhere.
41 | // Using singletons (approach 2):
42 | // https://wiki.qt.io/Qml_Styling
43 | // Check the qmldir for this singleton's import stuff.
44 | // We're also getting that example qmldir contents from here:
45 | // https://doc.qt.io/qt-6/qtqml-modules-qmldir.html
46 | pragma Singleton
47 | import QtQuick
48 |
49 | QtObject {
50 | // These font properties are basically the values for Windows Phone,
51 | // but translated to be used in QML. See also:
52 | // https://learn.microsoft.com/en-us/previous-versions/windows/apps/ff769552(v=vs.105)#font-names
53 | // That link goes to the font names, but scrolling down will show
54 | // font sizes and text styles (font families and font sizes combined usually it
55 | // appears, but sometimes margins and colors are included).
56 | // I'm not entirely sure yet how to put them together into text styles.
57 | // TODO: Put them together into text styles.
58 | // TODO 2: Have some way that doesn't require the user to install the font,
59 | // maybe? unless that's a good idea? anyway, there also needs to be
60 | // a way to change the font used at runtime.
61 | property string regularFont: "Inter Display"
62 | property string lightFont: "Inter Display Light"
63 | property string semiboldFont: "Inter Display Semi Bold"
64 | // Inter doesn't have a Semi/DemiLight font style.
65 | //property string semilightFont: "Inter Display Semi Light"
66 |
67 | // Font weight is an enum:
68 | // https://doc.qt.io/qt-6/qml-font.html
69 | // We have to use "int" or "var" when referring to
70 | // enums in QML:
71 | // https://doc.qt.io/qt-6/qml-enumeration.html#using-the-enumeration-type-in-qml
72 | property int lightFontWeight: Font.Light
73 | property int regularFontWeight: Font.Normal
74 | property int semiboldFontWeight: Font.DemiBold
75 | // Inter doesn't have a Semi/DemiLight weight, but Noto
76 | // does for at least one version.
77 | //property int semilightFontWeight: 350
78 |
79 | // Font sizes for pointSize as reals.
80 | // See the MSDN link above for the font sizes we're using
81 | // under the "Font sizes" section, hope they don't mind.
82 | // Apparently "real" is double-precision, like actual doubles,
83 | // so we should be fine:
84 | // https://stackoverflow.com/questions/42308147/is-double-now-fully-equivalent-to-real-in-qml
85 | // Also add extrasmallFontSize, for anything that needs a smaller value than 12.
86 | // I've also added extraextrasmallFontSize for the action buttons in
87 | // the Action Center mainly.
88 | // Will probably need to change these to more realistic values
89 | // as they're integrated.
90 | property real extraextrasmallFontSize: 8
91 | property real extrasmallFontSize: 10
92 | property real smallFontSize: 12
93 | property real normalFontSize: 16
94 | property real mediumFontSize: 18
95 | property real mediumlargeFontSize: 25.333
96 | property real largeFontSize: 32
97 | property real extralargeFontSize: 42.667
98 | property real extraextralargeFontSize: 72
99 | property real hugeFontSize: 186.667
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | }
--------------------------------------------------------------------------------
/RetiledSettings/libs/libRetiledSettings/settingsReader.py:
--------------------------------------------------------------------------------
1 | # libRetiledSettings - Utility library for Retiled that works with settings.
2 | # This file is used for reading settings from config files.
3 | # Copyright (C) 2022-2023 Drew Naylor
4 | # (Note that the copyright years include the years left out by the hyphen.)
5 | # Windows Phone and all other related copyrights and trademarks are property
6 | # of Microsoft Corporation. All rights reserved.
7 | #
8 | # This file is a part of the Retiled project.
9 | # Neither Retiled nor Drew Naylor are associated with Microsoft
10 | # and Microsoft does not endorse Retiled.
11 | # Any other copyrights and trademarks belong to their
12 | # respective people and companies/organizations.
13 | #
14 | #
15 | # Licensed under the MIT License (the "License");
16 | # you may not use this file except in compliance with the License.
17 | #
18 | # The MIT License (MIT)
19 | # Copyright (C) 2022-2023 Drew Naylor
20 | #
21 | # Permission is hereby granted, free of charge,
22 | # to any person obtaining a copy of this
23 | # software and associated documentation files
24 | # (the “Software”), to deal in the Software
25 | # without restriction, including without
26 | # limitation the rights to use, copy, modify,
27 | # merge, publish, distribute, sublicense,
28 | # and/or sell copies of the Software, and to
29 | # permit persons to whom the Software is
30 | # furnished to do so, subject to the following
31 | # conditions:
32 | #
33 | # The above copyright notice and this permission
34 | # notice shall be included in all copies or
35 | # substantial portions of the Software.
36 | #
37 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
38 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
39 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
41 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
42 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
43 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
45 | # OTHERWISE, ARISING FROM, OUT OF OR IN
46 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
47 | # OTHER DEALINGS IN THE SOFTWARE.
48 |
49 |
50 |
51 |
52 | # configparser is used as the .config file reader.
53 | import configparser
54 | from os.path import exists
55 |
56 | def getSetting(inputFile, keyToGet, defaultValue, fileName = "", sectionName = "Settings", IsCustomKey = True):
57 | # fileName and IsCustomKey are both optional.
58 |
59 | # Check if the path exists first to prevent using
60 | # extra memory to create the config parser if we don't have to:
61 | # https://stackoverflow.com/a/8933290
62 | if not exists(inputFile):
63 | # Return the default value if the file doesn't exist.
64 | # This should prevent issues at runtime.
65 | return defaultValue
66 | else:
67 |
68 | # Create a configparser to read the .config files.
69 | # We have to change some of the options to work with
70 | # only valid .config files by using options described
71 | # in the Python docs here:
72 | # https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour
73 | # Turn off interpolation, too, since that interferes with fields.
74 | # "Strict" is on because these files shouldn't have multiple keys.
75 | settingsFileReader = configparser.ConfigParser(delimiters=('='), comment_prefixes=('#'), empty_lines_in_values=False, interpolation=None)
76 |
77 | # Now read the file into the settingsFileReader.
78 | # Basing this off this page here:
79 | # https://www.tutorialspoint.com/how-to-read-a-text-file-in-python
80 | # I had a TODO here about escaping backslashes, but it just does that.
81 | # Actually, configparser has a read_file function:
82 | # https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_file
83 | # For some reason, I had to start specifying the encoding as UTF-8
84 | # as of July 2, 2022, at least for Python on Windows. Not sure about
85 | # any other platforms. I don't know why it broke suddenly.
86 | # More info here:
87 | # https://stackoverflow.com/a/42070962
88 | settingsFile = open(inputFile, "r", encoding='utf-8')
89 | settingsFileReader.read_file(settingsFile)
90 | # We can now close the file since it's in the configparser.
91 | settingsFile.close()
92 |
93 | # Now print the sections for debugging.
94 | #print(settingsFileReader.sections())
95 |
96 | # We need to specify that we'll use the Desktop Entry section.
97 | # Currently I don't know how to check if it exists or not.
98 | # Actually, this'll be done in the return part.
99 |
100 | # Python 3.10 has its own version of Select Case,
101 | # but it's not stable yet, though it will be on October 4, 2021,
102 | # which is the day after I'm writing this so I'll just
103 | # use if statements for now. More info here:
104 | # https://stackoverflow.com/a/66877137
105 | # For now I'm just using an if statement as detailed here:
106 | # https://stackoverflow.com/a/66886730
107 | # TODO: Change to using Python's Select Case statements, it's almost been
108 | # a year.
109 | # Update: it's been over a year.
110 | if IsCustomKey == True:
111 | # Return the value of the key specified in keyToGet.
112 | # This works, I just have to remember to set IsCustomKey = True
113 | # for anything I haven't implemented yet.
114 | # Make sure the key is in the file and return the default
115 | # if it's not:
116 | # https://stackoverflow.com/a/21057828
117 | if settingsFileReader.has_option(sectionName, keyToGet):
118 | return settingsFileReader.get(sectionName, keyToGet)
119 | else:
120 | return defaultValue
121 |
122 |
--------------------------------------------------------------------------------
/RetiledActionCenter/libs/libRetiledSettings/settingsReader.py:
--------------------------------------------------------------------------------
1 | # libRetiledSettings - Utility library for Retiled that works with settings.
2 | # This file is used for reading settings from config files.
3 | # Copyright (C) 2022-2023 Drew Naylor
4 | # (Note that the copyright years include the years left out by the hyphen.)
5 | # Windows Phone and all other related copyrights and trademarks are property
6 | # of Microsoft Corporation. All rights reserved.
7 | #
8 | # This file is a part of the Retiled project.
9 | # Neither Retiled nor Drew Naylor are associated with Microsoft
10 | # and Microsoft does not endorse Retiled.
11 | # Any other copyrights and trademarks belong to their
12 | # respective people and companies/organizations.
13 | #
14 | #
15 | # Licensed under the MIT License (the "License");
16 | # you may not use this file except in compliance with the License.
17 | #
18 | # The MIT License (MIT)
19 | # Copyright (C) 2022-2023 Drew Naylor
20 | #
21 | # Permission is hereby granted, free of charge,
22 | # to any person obtaining a copy of this
23 | # software and associated documentation files
24 | # (the “Software”), to deal in the Software
25 | # without restriction, including without
26 | # limitation the rights to use, copy, modify,
27 | # merge, publish, distribute, sublicense,
28 | # and/or sell copies of the Software, and to
29 | # permit persons to whom the Software is
30 | # furnished to do so, subject to the following
31 | # conditions:
32 | #
33 | # The above copyright notice and this permission
34 | # notice shall be included in all copies or
35 | # substantial portions of the Software.
36 | #
37 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
38 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
39 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
41 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
42 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
43 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
45 | # OTHERWISE, ARISING FROM, OUT OF OR IN
46 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
47 | # OTHER DEALINGS IN THE SOFTWARE.
48 |
49 |
50 |
51 |
52 | # configparser is used as the .config file reader.
53 | import configparser
54 | from os.path import exists
55 |
56 | def getSetting(inputFile, keyToGet, defaultValue, fileName = "", sectionName = "Settings", IsCustomKey = True):
57 | # fileName and IsCustomKey are both optional.
58 |
59 | # Check if the path exists first to prevent using
60 | # extra memory to create the config parser if we don't have to:
61 | # https://stackoverflow.com/a/8933290
62 | if not exists(inputFile):
63 | # Return the default value if the file doesn't exist.
64 | # This should prevent issues at runtime.
65 | return defaultValue
66 | else:
67 |
68 | # Create a configparser to read the .config files.
69 | # We have to change some of the options to work with
70 | # only valid .config files by using options described
71 | # in the Python docs here:
72 | # https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour
73 | # Turn off interpolation, too, since that interferes with fields.
74 | # "Strict" is on because these files shouldn't have multiple keys.
75 | settingsFileReader = configparser.ConfigParser(delimiters=('='), comment_prefixes=('#'), empty_lines_in_values=False, interpolation=None)
76 |
77 | # Now read the file into the settingsFileReader.
78 | # Basing this off this page here:
79 | # https://www.tutorialspoint.com/how-to-read-a-text-file-in-python
80 | # I had a TODO here about escaping backslashes, but it just does that.
81 | # Actually, configparser has a read_file function:
82 | # https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_file
83 | # For some reason, I had to start specifying the encoding as UTF-8
84 | # as of July 2, 2022, at least for Python on Windows. Not sure about
85 | # any other platforms. I don't know why it broke suddenly.
86 | # More info here:
87 | # https://stackoverflow.com/a/42070962
88 | settingsFile = open(inputFile, "r", encoding='utf-8')
89 | settingsFileReader.read_file(settingsFile)
90 | # We can now close the file since it's in the configparser.
91 | settingsFile.close()
92 |
93 | # Now print the sections for debugging.
94 | #print(settingsFileReader.sections())
95 |
96 | # We need to specify that we'll use the Desktop Entry section.
97 | # Currently I don't know how to check if it exists or not.
98 | # Actually, this'll be done in the return part.
99 |
100 | # Python 3.10 has its own version of Select Case,
101 | # but it's not stable yet, though it will be on October 4, 2021,
102 | # which is the day after I'm writing this so I'll just
103 | # use if statements for now. More info here:
104 | # https://stackoverflow.com/a/66877137
105 | # For now I'm just using an if statement as detailed here:
106 | # https://stackoverflow.com/a/66886730
107 | # TODO: Change to using Python's Select Case statements, it's almost been
108 | # a year.
109 | # Update: it's been over a year.
110 | if IsCustomKey == True:
111 | # Return the value of the key specified in keyToGet.
112 | # This works, I just have to remember to set IsCustomKey = True
113 | # for anything I haven't implemented yet.
114 | # Make sure the key is in the file and return the default
115 | # if it's not:
116 | # https://stackoverflow.com/a/21057828
117 | if settingsFileReader.has_option(sectionName, keyToGet):
118 | return settingsFileReader.get(sectionName, keyToGet)
119 | else:
120 | return defaultValue
121 |
122 |
--------------------------------------------------------------------------------
/RetiledSearch/RetiledSearch/libs/libRetiledSettings/settingsReader.py:
--------------------------------------------------------------------------------
1 | # libRetiledSettings - Utility library for Retiled that works with settings.
2 | # This file is used for reading settings from config files.
3 | # Copyright (C) 2022-2023 Drew Naylor
4 | # (Note that the copyright years include the years left out by the hyphen.)
5 | # Windows Phone and all other related copyrights and trademarks are property
6 | # of Microsoft Corporation. All rights reserved.
7 | #
8 | # This file is a part of the Retiled project.
9 | # Neither Retiled nor Drew Naylor are associated with Microsoft
10 | # and Microsoft does not endorse Retiled.
11 | # Any other copyrights and trademarks belong to their
12 | # respective people and companies/organizations.
13 | #
14 | #
15 | # Licensed under the MIT License (the "License");
16 | # you may not use this file except in compliance with the License.
17 | #
18 | # The MIT License (MIT)
19 | # Copyright (C) 2022-2023 Drew Naylor
20 | #
21 | # Permission is hereby granted, free of charge,
22 | # to any person obtaining a copy of this
23 | # software and associated documentation files
24 | # (the “Software”), to deal in the Software
25 | # without restriction, including without
26 | # limitation the rights to use, copy, modify,
27 | # merge, publish, distribute, sublicense,
28 | # and/or sell copies of the Software, and to
29 | # permit persons to whom the Software is
30 | # furnished to do so, subject to the following
31 | # conditions:
32 | #
33 | # The above copyright notice and this permission
34 | # notice shall be included in all copies or
35 | # substantial portions of the Software.
36 | #
37 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
38 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
39 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
41 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
42 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
43 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
45 | # OTHERWISE, ARISING FROM, OUT OF OR IN
46 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
47 | # OTHER DEALINGS IN THE SOFTWARE.
48 |
49 |
50 |
51 |
52 | # configparser is used as the .config file reader.
53 | import configparser
54 | from os.path import exists
55 |
56 | def getSetting(inputFile, keyToGet, defaultValue, fileName = "", sectionName = "Settings", IsCustomKey = True):
57 | # fileName and IsCustomKey are both optional.
58 |
59 | # Check if the path exists first to prevent using
60 | # extra memory to create the config parser if we don't have to:
61 | # https://stackoverflow.com/a/8933290
62 | if not exists(inputFile):
63 | # Return the default value if the file doesn't exist.
64 | # This should prevent issues at runtime.
65 | return defaultValue
66 | else:
67 |
68 | # Create a configparser to read the .config files.
69 | # We have to change some of the options to work with
70 | # only valid .config files by using options described
71 | # in the Python docs here:
72 | # https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour
73 | # Turn off interpolation, too, since that interferes with fields.
74 | # "Strict" is on because these files shouldn't have multiple keys.
75 | settingsFileReader = configparser.ConfigParser(delimiters=('='), comment_prefixes=('#'), empty_lines_in_values=False, interpolation=None)
76 |
77 | # Now read the file into the settingsFileReader.
78 | # Basing this off this page here:
79 | # https://www.tutorialspoint.com/how-to-read-a-text-file-in-python
80 | # I had a TODO here about escaping backslashes, but it just does that.
81 | # Actually, configparser has a read_file function:
82 | # https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_file
83 | # For some reason, I had to start specifying the encoding as UTF-8
84 | # as of July 2, 2022, at least for Python on Windows. Not sure about
85 | # any other platforms. I don't know why it broke suddenly.
86 | # More info here:
87 | # https://stackoverflow.com/a/42070962
88 | settingsFile = open(inputFile, "r", encoding='utf-8')
89 | settingsFileReader.read_file(settingsFile)
90 | # We can now close the file since it's in the configparser.
91 | settingsFile.close()
92 |
93 | # Now print the sections for debugging.
94 | #print(settingsFileReader.sections())
95 |
96 | # We need to specify that we'll use the Desktop Entry section.
97 | # Currently I don't know how to check if it exists or not.
98 | # Actually, this'll be done in the return part.
99 |
100 | # Python 3.10 has its own version of Select Case,
101 | # but it's not stable yet, though it will be on October 4, 2021,
102 | # which is the day after I'm writing this so I'll just
103 | # use if statements for now. More info here:
104 | # https://stackoverflow.com/a/66877137
105 | # For now I'm just using an if statement as detailed here:
106 | # https://stackoverflow.com/a/66886730
107 | # TODO: Change to using Python's Select Case statements, it's almost been
108 | # a year.
109 | # Update: it's been over a year.
110 | if IsCustomKey == True:
111 | # Return the value of the key specified in keyToGet.
112 | # This works, I just have to remember to set IsCustomKey = True
113 | # for anything I haven't implemented yet.
114 | # Make sure the key is in the file and return the default
115 | # if it's not:
116 | # https://stackoverflow.com/a/21057828
117 | if settingsFileReader.has_option(sectionName, keyToGet):
118 | return settingsFileReader.get(sectionName, keyToGet)
119 | else:
120 | return defaultValue
121 |
122 |
--------------------------------------------------------------------------------
/RetiledStart/RetiledStart/libs/libRetiledSettings/settingsReader.py:
--------------------------------------------------------------------------------
1 | # libRetiledSettings - Utility library for Retiled that works with settings.
2 | # This file is used for reading settings from config files.
3 | # Copyright (C) 2022-2023 Drew Naylor
4 | # (Note that the copyright years include the years left out by the hyphen.)
5 | # Windows Phone and all other related copyrights and trademarks are property
6 | # of Microsoft Corporation. All rights reserved.
7 | #
8 | # This file is a part of the Retiled project.
9 | # Neither Retiled nor Drew Naylor are associated with Microsoft
10 | # and Microsoft does not endorse Retiled.
11 | # Any other copyrights and trademarks belong to their
12 | # respective people and companies/organizations.
13 | #
14 | #
15 | # Licensed under the MIT License (the "License");
16 | # you may not use this file except in compliance with the License.
17 | #
18 | # The MIT License (MIT)
19 | # Copyright (C) 2022-2023 Drew Naylor
20 | #
21 | # Permission is hereby granted, free of charge,
22 | # to any person obtaining a copy of this
23 | # software and associated documentation files
24 | # (the “Software”), to deal in the Software
25 | # without restriction, including without
26 | # limitation the rights to use, copy, modify,
27 | # merge, publish, distribute, sublicense,
28 | # and/or sell copies of the Software, and to
29 | # permit persons to whom the Software is
30 | # furnished to do so, subject to the following
31 | # conditions:
32 | #
33 | # The above copyright notice and this permission
34 | # notice shall be included in all copies or
35 | # substantial portions of the Software.
36 | #
37 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
38 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
39 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
41 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
42 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
43 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
45 | # OTHERWISE, ARISING FROM, OUT OF OR IN
46 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
47 | # OTHER DEALINGS IN THE SOFTWARE.
48 |
49 |
50 |
51 |
52 | # configparser is used as the .config file reader.
53 | import configparser
54 | from os.path import exists
55 |
56 | def getSetting(inputFile, keyToGet, defaultValue, fileName = "", sectionName = "Settings", IsCustomKey = True):
57 | # fileName and IsCustomKey are both optional.
58 |
59 | # Check if the path exists first to prevent using
60 | # extra memory to create the config parser if we don't have to:
61 | # https://stackoverflow.com/a/8933290
62 | if not exists(inputFile):
63 | # Return the default value if the file doesn't exist.
64 | # This should prevent issues at runtime.
65 | return defaultValue
66 | else:
67 |
68 | # Create a configparser to read the .config files.
69 | # We have to change some of the options to work with
70 | # only valid .config files by using options described
71 | # in the Python docs here:
72 | # https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour
73 | # Turn off interpolation, too, since that interferes with fields.
74 | # "Strict" is on because these files shouldn't have multiple keys.
75 | settingsFileReader = configparser.ConfigParser(delimiters=('='), comment_prefixes=('#'), empty_lines_in_values=False, interpolation=None)
76 |
77 | # Now read the file into the settingsFileReader.
78 | # Basing this off this page here:
79 | # https://www.tutorialspoint.com/how-to-read-a-text-file-in-python
80 | # I had a TODO here about escaping backslashes, but it just does that.
81 | # Actually, configparser has a read_file function:
82 | # https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_file
83 | # For some reason, I had to start specifying the encoding as UTF-8
84 | # as of July 2, 2022, at least for Python on Windows. Not sure about
85 | # any other platforms. I don't know why it broke suddenly.
86 | # More info here:
87 | # https://stackoverflow.com/a/42070962
88 | settingsFile = open(inputFile, "r", encoding='utf-8')
89 | settingsFileReader.read_file(settingsFile)
90 | # We can now close the file since it's in the configparser.
91 | settingsFile.close()
92 |
93 | # Now print the sections for debugging.
94 | #print(settingsFileReader.sections())
95 |
96 | # We need to specify that we'll use the Desktop Entry section.
97 | # Currently I don't know how to check if it exists or not.
98 | # Actually, this'll be done in the return part.
99 |
100 | # Python 3.10 has its own version of Select Case,
101 | # but it's not stable yet, though it will be on October 4, 2021,
102 | # which is the day after I'm writing this so I'll just
103 | # use if statements for now. More info here:
104 | # https://stackoverflow.com/a/66877137
105 | # For now I'm just using an if statement as detailed here:
106 | # https://stackoverflow.com/a/66886730
107 | # TODO: Change to using Python's Select Case statements, it's almost been
108 | # a year.
109 | # Update: it's been over a year.
110 | if IsCustomKey == True:
111 | # Return the value of the key specified in keyToGet.
112 | # This works, I just have to remember to set IsCustomKey = True
113 | # for anything I haven't implemented yet.
114 | # Make sure the key is in the file and return the default
115 | # if it's not:
116 | # https://stackoverflow.com/a/21057828
117 | if settingsFileReader.has_option(sectionName, keyToGet):
118 | return settingsFileReader.get(sectionName, keyToGet)
119 | else:
120 | return defaultValue
121 |
122 |
--------------------------------------------------------------------------------
/RetiledCompositor/RetiledCompositor/libs/libRetiledSettings/settingsReader.py:
--------------------------------------------------------------------------------
1 | # libRetiledSettings - Utility library for Retiled that works with settings.
2 | # This file is used for reading settings from config files.
3 | # Copyright (C) 2022-2023 Drew Naylor
4 | # (Note that the copyright years include the years left out by the hyphen.)
5 | # Windows Phone and all other related copyrights and trademarks are property
6 | # of Microsoft Corporation. All rights reserved.
7 | #
8 | # This file is a part of the Retiled project.
9 | # Neither Retiled nor Drew Naylor are associated with Microsoft
10 | # and Microsoft does not endorse Retiled.
11 | # Any other copyrights and trademarks belong to their
12 | # respective people and companies/organizations.
13 | #
14 | #
15 | # Licensed under the MIT License (the "License");
16 | # you may not use this file except in compliance with the License.
17 | #
18 | # The MIT License (MIT)
19 | # Copyright (C) 2022-2023 Drew Naylor
20 | #
21 | # Permission is hereby granted, free of charge,
22 | # to any person obtaining a copy of this
23 | # software and associated documentation files
24 | # (the “Software”), to deal in the Software
25 | # without restriction, including without
26 | # limitation the rights to use, copy, modify,
27 | # merge, publish, distribute, sublicense,
28 | # and/or sell copies of the Software, and to
29 | # permit persons to whom the Software is
30 | # furnished to do so, subject to the following
31 | # conditions:
32 | #
33 | # The above copyright notice and this permission
34 | # notice shall be included in all copies or
35 | # substantial portions of the Software.
36 | #
37 | # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT
38 | # WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
39 | # INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
41 | # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
42 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
43 | # FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR
45 | # OTHERWISE, ARISING FROM, OUT OF OR IN
46 | # CONNECTION WITH THE SOFTWARE OR THE USE OR
47 | # OTHER DEALINGS IN THE SOFTWARE.
48 |
49 |
50 |
51 |
52 | # configparser is used as the .config file reader.
53 | import configparser
54 | from os.path import exists
55 |
56 | def getSetting(inputFile, keyToGet, defaultValue, fileName = "", sectionName = "Settings", IsCustomKey = True):
57 | # fileName and IsCustomKey are both optional.
58 |
59 | # Check if the path exists first to prevent using
60 | # extra memory to create the config parser if we don't have to:
61 | # https://stackoverflow.com/a/8933290
62 | if not exists(inputFile):
63 | # Return the default value if the file doesn't exist.
64 | # This should prevent issues at runtime.
65 | return defaultValue
66 | else:
67 |
68 | # Create a configparser to read the .config files.
69 | # We have to change some of the options to work with
70 | # only valid .config files by using options described
71 | # in the Python docs here:
72 | # https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour
73 | # Turn off interpolation, too, since that interferes with fields.
74 | # "Strict" is on because these files shouldn't have multiple keys.
75 | settingsFileReader = configparser.ConfigParser(delimiters=('='), comment_prefixes=('#'), empty_lines_in_values=False, interpolation=None)
76 |
77 | # Now read the file into the settingsFileReader.
78 | # Basing this off this page here:
79 | # https://www.tutorialspoint.com/how-to-read-a-text-file-in-python
80 | # I had a TODO here about escaping backslashes, but it just does that.
81 | # Actually, configparser has a read_file function:
82 | # https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.read_file
83 | # For some reason, I had to start specifying the encoding as UTF-8
84 | # as of July 2, 2022, at least for Python on Windows. Not sure about
85 | # any other platforms. I don't know why it broke suddenly.
86 | # More info here:
87 | # https://stackoverflow.com/a/42070962
88 | settingsFile = open(inputFile, "r", encoding='utf-8')
89 | settingsFileReader.read_file(settingsFile)
90 | # We can now close the file since it's in the configparser.
91 | settingsFile.close()
92 |
93 | # Now print the sections for debugging.
94 | #print(settingsFileReader.sections())
95 |
96 | # We need to specify that we'll use the Desktop Entry section.
97 | # Currently I don't know how to check if it exists or not.
98 | # Actually, this'll be done in the return part.
99 |
100 | # Python 3.10 has its own version of Select Case,
101 | # but it's not stable yet, though it will be on October 4, 2021,
102 | # which is the day after I'm writing this so I'll just
103 | # use if statements for now. More info here:
104 | # https://stackoverflow.com/a/66877137
105 | # For now I'm just using an if statement as detailed here:
106 | # https://stackoverflow.com/a/66886730
107 | # TODO: Change to using Python's Select Case statements, it's almost been
108 | # a year.
109 | # Update: it's been over a year.
110 | if IsCustomKey == True:
111 | # Return the value of the key specified in keyToGet.
112 | # This works, I just have to remember to set IsCustomKey = True
113 | # for anything I haven't implemented yet.
114 | # Make sure the key is in the file and return the default
115 | # if it's not:
116 | # https://stackoverflow.com/a/21057828
117 | if settingsFileReader.has_option(sectionName, keyToGet):
118 | return settingsFileReader.get(sectionName, keyToGet)
119 | else:
120 | return defaultValue
121 |
122 |
--------------------------------------------------------------------------------
/RetiledStyles/PlainPageHeader.qml:
--------------------------------------------------------------------------------
1 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
2 | // Retiled project. Some code was copied from
3 | // the official qtdeclarative repo, which you can
4 | // access a copy of here:
5 | // https://github.com/DrewNaylor/qtdeclarative
6 | // Copyright (C) 2021-2023 Drew Naylor
7 | // (Note that the copyright years include the years left out by the hyphen.)
8 | // Windows Phone and all other related copyrights and trademarks are property
9 | // of Microsoft Corporation. All rights reserved.
10 | //
11 | // This file is a part of the RetiledStyles project, which is used by Retiled.
12 | // Neither Retiled nor Drew Naylor are associated with Microsoft
13 | // and Microsoft does not endorse Retiled.
14 | // Any other copyrights and trademarks belong to their
15 | // respective people and companies/organizations.
16 | //
17 | //
18 | // RetiledStyles is free software: you can redistribute it and/or modify
19 | // it under the terms of the GNU Lesser General Public License
20 | // version 3 as published by the Free Software Foundation.
21 | // All files in this repo (Retiled) licensed under the Apache License, 2.0,
22 | // are using RetiledStyles under the LGPLv3.
23 | //
24 | // Alternatively, this file may be used under the terms of the GNU
25 | // General Public License version 2.0 or later as published by the Free
26 | // Software Foundation and appearing in the file LICENSE.GPL included in
27 | // the packaging of this file. Please review the following information to
28 | // ensure the GNU General Public License version 2.0 requirements will be
29 | // met: http://www.gnu.org/licenses/gpl-2.0.html.
30 | //
31 | // This program is distributed in the hope that it will be useful,
32 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 | // GNU (Lesser) General Public License for more details.
35 | //
36 | // You should have received a copy of the GNU (Lesser) General Public License
37 | // along with this program. If not, see .
38 |
39 |
40 |
41 | import "." as RetiledStyles
42 | import QtQuick
43 | import QtQuick.Controls
44 | import QtQuick.Layouts
45 | ToolBar {
46 |
47 | // Do properties so the text can be changed.
48 | property string appTitleText;
49 | property string pageTitleText;
50 |
51 | // Didn't know this is how you set background colors for
52 | // controls in QML.
53 | // Based on this info here:
54 | // https://stackoverflow.com/a/27619649
55 | background: Rectangle {
56 | // TODO: Switch to using the theme background color
57 | // when implemented.
58 | color: ThemeLoader.getValueFromTheme(themePath, "PageHeader", "BackgroundColor", "black")
59 | }
60 |
61 | RowLayout {
62 | anchors.left: parent.left
63 |
64 | Item {
65 | // Adding an empty Item to space the header from the left.
66 | // TODO: Get this empty item's spacing to be closer to WP's
67 | // spacing for a given app that uses large headers, like
68 | // pages in the Settings app.
69 | height: 50
70 | // When combined with "12" for the about text main body,
71 | // this forces the title and the body to line up.
72 | width: 6
73 | }
74 |
75 | ColumnLayout {
76 | Label {
77 | // I think this is about how the app titles
78 | // should appear, but it might be off.
79 | id: appTitleLabel
80 | text: appTitleText
81 | font.capitalization: Font.AllUppercase
82 | // Not sure if this is the right font size, but it's closer.
83 | // pixelSize isn't device-independent.
84 | font.pointSize: RetiledStyles.FontStyles.smallFontSize
85 | // Set font.
86 | font.family: RetiledStyles.FontStyles.semiboldFont
87 | font.weight: RetiledStyles.FontStyles.semiboldFontWeight
88 | // Actually I'm not sure about using letter spacing now.
89 | //font.letterSpacing: -0.8 * scaleFactor
90 | elide: Label.ElideRight
91 | horizontalAlignment: Qt.AlignLeft
92 | verticalAlignment: Qt.AlignVCenter
93 | Layout.fillWidth: true
94 | color: ThemeLoader.getValueFromTheme(themePath, "PageHeader", "TextColor", "white")
95 | // Set top margin.
96 | Layout.topMargin: 24
97 | } // End of page title
98 |
99 | Label {
100 | id: pageTitleLabel
101 | text: pageTitleText
102 | // Not sure if this is the right font size, but it's closer.
103 | // pixelSize isn't device-independent.
104 | font.pointSize: RetiledStyles.FontStyles.extralargeFontSize
105 | // Set font.
106 | font.family: RetiledStyles.FontStyles.lightFont
107 | font.weight: RetiledStyles.FontStyles.lightFontWeight
108 | // Actually I'm not sure about using letter spacing now.
109 | //font.letterSpacing: -0.8 * scaleFactor
110 | elide: Label.ElideRight
111 | horizontalAlignment: Qt.AlignLeft
112 | verticalAlignment: Qt.AlignVCenter
113 | Layout.fillWidth: true
114 | color: ThemeLoader.getValueFromTheme(themePath, "PageHeader", "TextColor", "white")
115 | // Set top margin.
116 | Layout.topMargin: -6
117 | } // End of page title
118 |
119 | Item {
120 | // Empty item as a spacer for the header.
121 | // Can't seem to get margins working on the layouts
122 | // directly.
123 | height: 12
124 | }
125 |
126 | } // End of ColumnLayout holding the app and page title labels.
127 | } // End of RowLayout giving a margin to the app and page title
128 | } // End of the ToolBar containing the header.
--------------------------------------------------------------------------------
/docs/system-requirements.md:
--------------------------------------------------------------------------------
1 | # System Requirements
2 |
3 | To run Retiled, your device requires the following:
4 |
5 | (Please refer to [the readme](../README.md#required-extra-packages) for up-to-date package requirments; they may change over time and this document may become out of date.)
6 |
7 | ## Packages
8 | - Python 3.9 or greater
9 | - Python is used to run most of Retiled.
10 | - postmarketOS might use `python3` instead of `python` sometimes, but I've noticed just `python` is fine now.
11 | - Generally speaking, you should already have Python installed, but if you don't, use one of the following commands without quotes:
12 | - Manjaro ARM: "sudo pacman -Syu python"
13 |
14 | - pyside6
15 | - Used for the UI of Python/QML-based components of Retiled.
16 | - You probably won't have this package already, so you can use one of the following commands to install it, just without the quotes:
17 | - Manjaro ARM: "sudo pacman -Syu pyside6"
18 | - postmarketOS: "sudo apk add py3-pyside6"
19 |
20 | - qt6-declarative
21 | - Provides Qt6 QtQuick controls that are used in each component.
22 | - You probably won't have this package already, so you can use one of the following commands to install it, just without the quotes:
23 | - Manjaro ARM: "sudo pacman -Syu qt6-declarative"
24 | - postmarketOS: "sudo apk add qt6-qtdeclarative"
25 | - Please note: I may have forgotten to write this one down for postmarketOS before, and I need to ensure this is the right package.
26 | - qt6-wayland
27 | - Allows Qt6 apps like the ones included in Retiled to run under Wayland.
28 | - You probably won't have this package already, so you can use one of the following commands to install it, just without the quotes:
29 | - Manjaro ARM: "sudo pacman -Syu qt6-wayland"
30 | - postmarketOS: "sudo apk add qt6-qtwayland"
31 | - pyyaml
32 | - Helps read yaml files, which are used for configuration.
33 | - You probably won't have to install this yourself, as I just copied the library's files into my repo. The only case where you'll need to install it manually is if my repo doesn't have the proper compiled library for one of the files. In that case, please let me know. I don't feel comfortable just adding binaries from random people to my repo, so a way for me to acquire that binary will be necessary to specify.
34 | - If you do need pyyaml's compiled binary built for your specific device, you can install it via "pip":
35 | - "pip install pyyaml"
36 | - After installing, copy the file that starts with "_yaml" from the default location pip installs pyyaml to (usually "/usr/lib/python3.9/site-packages/yaml"), and either paste it in "/opt/Retiled/RetiledStart/RetiledStart/libs/pyyaml/yaml" if you can get root permissions easily, or paste it in "(the folder you downloaded Retiled to)/RetiledStart/RetiledStart/libs/pyyaml/yaml", then run "sh Scripts/install-retiled.sh" again so it can copy the new file you just pasted there. Please note: this manual library installation of running the install script again may not always work, so you may need to copy via the command line as root, though that should be easy.
37 | - qt6-svg
38 | - Allows SVG images to be displayed in Qt6 apps.
39 | - Should be already installed unless you're running a non-Qt environment, such as Xfce.
40 | - You can install it using one of these commands:
41 | - Manjaro: `sudo pacman -Syu qt6-svg`
42 | - libopengl0
43 | - Required if you want to run stuff on something like Linux Mint Cinnamon, but otherwise not required on Manjaro ARM with Plasma Mobile.
44 | - Not sure if this is installed by default on other distros, or if it's something that GTK ones lack.
45 | - Also not sure of the package name on non-Ubuntu distros.
46 |
47 | ## Architectures
48 | - Tested on x86-64 (Intel/AMD 64-bit) and aarch64 (ARM 64-bit).
49 |
50 | ## Hardware requirements
51 | - Tested on the 3 GB RAM/32 GB storage PinePhone; other Linux phones may also work if they support Manjaro ARM with Plasma Mobile.
52 | - It is uncertain whether the 2 GB RAM/16 GB storage PinePhone will work, but it should. I bought the one with higher specs mainly for the dock.
53 |
54 | ## Operating systems
55 | - Manjaro ARM with Plasma Mobile is officially supported and recommended due to Plasma being Qt-based.
56 | - I'd like to also support postmarketOS, but it hasn't been tested there yet.
57 | - Update Dec 15, 2021: I tested this under postmarketOS Plasma Mobile, and things aren't perfect, with the biggest issue being that trying to do a search in the search app gives the error of "Unknown error code 100 Could not find the program 'webbrowser-app' Please send a full bug report at https://bugs.kde.org."
58 | - Update Apr 5, 2023: RetiledSearch does work in pmOS now as of probably a while ago, but it opens Firefox, which doesn't currently work correctly in my experience. If it were changed to Angelfish, it'd probably be fine.
59 | - ~~The scripts need to be altered for postmarketOS due to it using "python3" instead of just "python". Hopefully it would work on Manjaro ARM, too.~~ I tried this, but it doesn't need to be done.
60 | - DanctNIX's Arch Linux ARM should also work due to being semi-upstream from Manjaro ARM (I don't know whether Manjaro ARM uses the regular ALARM or the DanctNIX one), but I haven't tested the Plasma Mobile image with this yet.
61 | - Windows support is limited to some debugging and you'll have to manually change paths in the code for it to work in case you don't use the same paths I do. Perhaps I should add the sample .desktop files to the repo so things work.
62 |
63 | ## Disk space
64 | - On Manjaro ARM with Plasma Mobile
65 | - Minimum: 250 MB
66 | - Recommended: 500 MB
67 | - To be safe, probably like 250 MB would be enough to give space at minimum, as PySide6 and qt6-declarative take up a decent amount of space. Calculating how much both of those packages take up shows they're roughly 192 MB, so I increased the number for comfort.
68 | - Disk space is mostly based on the space that the libraries take up. Retiled itself is quite small, although some config files may take up more space.
69 |
--------------------------------------------------------------------------------
/docs/sticky-notes-archive.md:
--------------------------------------------------------------------------------
1 | These are some sticky notes I have written down about what I want to do with Retiled, and I figured they should be archived here. Some parts like the Fortun one were heavily modified from the original sticky notes, but only to improve clarification and reflect changes in how I think the best way things can be handled would be as of writing them.
2 |
3 | ## Fortun
4 |
5 | A Live Tile example app where it shows a random quote from fortune output, refreshing every 30 minutes like regular Live Tiles. The cow from cowsay will be on the back of the medium tile to save space if cowsay support is enabled by the user (otherwise it just shows the app icon), with the quote on the front. The quote will be optionally piped to cowsay so that the cow will be next to the quote on the wide tile as an example there, but only if the user wants to use cowsay support. Small tiles and the All Apps list icon will just use the app's icon. Not sure what can go on the back of the wide tile as an example for putting stuff on the back of wide tiles.
6 |
7 | The app for Fortun itself has a header that says "fortun" at the top and below that, a button above a textbox. Pressing the button will run fortune and show its output in the textbox, with the quote optionally piped to cowsay to display in the cow's bubble. Opening the app from the Live Tile will display the full output from fortune in the output textbox, optionally with the cow if, again, cowsay support is enabled.
8 |
9 | There should be a button to clear its Live Tile cache, along with one to force an update. Those buttons will be in a Settings page for it in its appbar drawer. Clearing the cache will cause wide and medium Live Tiles to just be the icon of the cow (or which is chosen for the .cow files in regards to the cow's appearance) if using cowsay support, or it'll show the app's icon if not, with the app's icon being what the small tile shows regardless of cache status. Forcing a tile update will be done in some way that may involve the app writing to its own Live Tile cache file. To make this easy for everyone, I'll have to make an API to use that forces a tile to update on-demand. The tile for this app will only be refreshed on the next time the app is started if the cache was cleared and a refresh wasn't forced (apps will be able to force-refresh their Live Tiles whenever they want, just I think only doing it on startup if the cache is empty is a good idea for this example app; stuff like weather apps will probably want to force-refresh as soon as they have new weather data when they're open).
10 |
11 | More settings that can be offered include:
12 | - Enable cowsay support
13 | - Description: Pipes fortune output to cowsay to have the cow show up on the Live Tile.
14 | - Cowsay support options:
15 | - (dropdown with options for what program to pass to, including `cowsay`, `cowthink`, and a `custom` option allowing the user to specify a specific cowsay-style program; I am aware of at least one, and there may be more; for now, only cowsay and cowthink will be specified as options, but if requested, I can add more)
16 | - (options for changing the cow's appearance based on the standard parameters, including support for `-f`: https://en.wikipedia.org/wiki/Cowsay#Parameters )
17 | - Custom fortune parameters
18 | - Description: These get passed to fortune, so you can customize its output to your liking.
19 |
20 | This used to be called Cowsay GUI, but then I read that it's fortune that I was thinking of that picks random pieces of text, and not cowsay.
21 |
22 | To try to differentiate this app a little from other fortune GUIs (at least one exists), I named it Fortun, as I thought "Good Fortun" was a clever name for a sidequest in Xenoblade X, and it's cool to have a reference to that series. X on Switch, please?
23 |
24 | ## Waiting before having tiles start flipping
25 |
26 | Have each tile (that can flip) wait between 2 and 5 seconds (mathematically inclusive) before starting to flip when going back to Start. The random timing selection exists so that tiles don't all flip at once. Begin the timer after the user touches the screen if it's been too long since the last input as described in the next sentence, as well as after tapping the Start button to return to it (hopefully this makes sense). Eventually stop flipping if no input is detected for a while (30-45 seconds? 1 minute?).
27 |
28 | ## Back and Start button stuff
29 |
30 | Check if there are any other apps open when the RetiledStart app is activated (active focus, on-screen, on the top of all other apps) and navigate back to the previous one when tapping Back, or just go to the top of the tiles if Start is the only thing open.
31 |
32 | May need to figure out an API/D-Bus thing to tie this together, plus other apps could (should, and will have to in order to be an authentic experience) have a way to say if they can still go back or not. If an app doesn't support this, just send Escape. Otherwise, if an app says it can't go back any further, use the Wayland close thing to close the app.
33 |
34 | Grab the Windows/Meta key when RetiledStart is open and use it to override the navigation bar button so it just acts like Escape/the Back button and goes to the top of the tiles.
35 |
36 | ## Having tiles flip
37 |
38 | Ok, this isn't from a sticky note, but it's relevent to the Fortun part, so it's going here for now.
39 |
40 | I think a basic flipping animation may be able to involve tiles visually shrinking to 0 pixels then growing back to their regular size. The only thing I'm not sure about is I think this will cause issues with the layout because it expects each tile to be an exact size. Hopefully it's simple enough to do 3D rotation in QML.
41 |
42 | Update Sept. 3, 2022: Actually, rotation seems pretty easy to do, though I don't know if it'll interfere with the tilting animation if the tile is pressed during a flip.
43 |
44 | ## Closing the keyboard
45 |
46 | Close keyboard with Back button when the keyboard is implemented:
47 |
48 | Pseudocode:
49 |
50 | ```text
51 | if (keyboard open)
52 | close keyboard
53 | else if (multitasking)
54 | exit multitasking
55 | else
56 | send Escape
57 | end if
58 | ```
59 |
--------------------------------------------------------------------------------
/RetiledStyles/TileBackgroundShaderEffectSource.qml:
--------------------------------------------------------------------------------
1 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
2 | // Retiled project. Some code was copied from
3 | // the official qtdeclarative repo, which you can
4 | // access a copy of here:
5 | // https://github.com/DrewNaylor/qtdeclarative
6 | // Copyright (C) 2021-2023 Drew Naylor
7 | // (Note that the copyright years include the years left out by the hyphen.)
8 | // Windows Phone and all other related copyrights and trademarks are property
9 | // of Microsoft Corporation. All rights reserved.
10 | //
11 | // This file is a part of the RetiledStyles project, which is used by Retiled.
12 | // Neither Retiled nor Drew Naylor are associated with Microsoft
13 | // and Microsoft does not endorse Retiled.
14 | // Any other copyrights and trademarks belong to their
15 | // respective people and companies/organizations.
16 | //
17 | //
18 | // RetiledStyles is free software: you can redistribute it and/or modify
19 | // it under the terms of the GNU Lesser General Public License
20 | // version 3 as published by the Free Software Foundation.
21 | // All files in this repo (Retiled) licensed under the Apache License, 2.0,
22 | // are using RetiledStyles under the LGPLv3.
23 | //
24 | // Alternatively, this file may be used under the terms of the GNU
25 | // General Public License version 2.0 or later as published by the Free
26 | // Software Foundation and appearing in the file LICENSE.GPL included in
27 | // the packaging of this file. Please review the following information to
28 | // ensure the GNU General Public License version 2.0 requirements will be
29 | // met: http://www.gnu.org/licenses/gpl-2.0.html.
30 | //
31 | // This program is distributed in the hope that it will be useful,
32 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 | // GNU (Lesser) General Public License for more details.
35 | //
36 | // You should have received a copy of the GNU (Lesser) General Public License
37 | // along with this program. If not, see .
38 |
39 |
40 |
41 | import QtQuick
42 |
43 | ShaderEffectSource {
44 |
45 | // This is the tile wallpaper object/element,
46 | // with a background image as introduced in 8.1.
47 | // To see the code for the tile background images,
48 | // please open "TileBackgroundSolidColorRectangle.qml".
49 |
50 | // Trying to use ShaderEffectSource to show tile backgrounds.
51 | // Docs on ShaderEffectSource:
52 | // https://doc.qt.io/qt-6/qml-qtquick-shadereffectsource.html
53 |
54 | // Use the tile wallpaper for the source to put as the tile background.
55 | // I tried multiplying the width and height by the parent's scale (the tile's scale, that is),
56 | // and it's a little weird. There needs to be a way to have the background ignore
57 | // changes to scale and tilt, but I'm not sure what to do.
58 | // TODO: Figure out how to have it so that pressing a tile doesn't change
59 | // the "scale" of the part of the wallpaper shown on a tile
60 | // and instead "zooms in" and crops the visible part of the shader
61 | // effect source. Also do this for the tilt.
62 | sourceItem: tileWallpaper
63 | // Cut out parts of the wallpaper for each tile.
64 | // Here we're taking the current tile's X-value for the
65 | // shader effect source's X-value, then (this is complicated)
66 | // we add the top spacer above the tiles so that the image
67 | // at least shows behind all the tiles at the top, then we take
68 | // that and add it to the result of the height of the tilesFlickable (what you
69 | // interact with when scrolling through the tiles) divided by the window's height
70 | // added to the inverse/negative of the tilesFlickable's current contentY-value,
71 | // then we add all that to the tile's Y-value, and finally subtract the tile wallpaper's
72 | // current Y-value from it.
73 | // The last two are simple: just the tile's width and height.
74 | // This will result in the tile wallpaper (assigned as tileWallpaper.source, usually
75 | // in "Tiles.qml", but you can use your own Image source if you're using this in
76 | // your own app) scrolling "through" the tiles as if they were a window, like
77 | // in Windows Phone 8.1.
78 | // (This doesn't quite work if the window is too short/wide/skinny/tall and
79 | // the image isn't the right aspect ratio to fill it in; maybe we can
80 | // use a different fillMode or make it go slower if the window is smaller/larger?)
81 | // TODO: Fix the image starting to disappear when there are too many tiles.
82 | // If allowParallax is set to false, we only add the top spacer and 5 (to
83 | // ensure we don't display an empty area that would be covered up by the
84 | // background otherwise) to the inverse of the tilesFlickable's contentY
85 | // and we add that to the tile's Y-value. This results in there being no
86 | // parallax effect. Sadly, the extra 5 spacing moves the image a little,
87 | // but it's better that than to display a weird space with nothing.
88 | // Turning off parallax is for accessibility and the boolean is defined in
89 | // "Tiles.qml".
90 | sourceRect: Qt.rect(control.x, allowParallax == true ? (tilesPageTopSpacer.height + (-tilesFlickable.contentY + tilesFlickable.height / window.height) + control.y - tileWallpaper.y) : tilesPageTopSpacer.height + 5 + (-tilesFlickable.contentY) + control.y, control.width, control.height)
91 | // Hide the image source.
92 | hideSource: true
93 | Rectangle {
94 | // Darken the wallpaper by 20% like WP does,
95 | // or however much the user decided to set the
96 | // opacity to, with whichever color they decided
97 | // to use.
98 | // Only render it when the opacity is greater
99 | // than 0 to save processing power.
100 | visible: opacity > 0
101 | color: wallpaperOverlayLayerColor
102 | opacity: wallpaperOverlayLayerOpacity
103 | anchors.fill: parent
104 | }
105 | // Unfortunately, the tiles seem not very aliased, at least in Windows 10.
106 | }
--------------------------------------------------------------------------------
/docs/running-the-compositor.md:
--------------------------------------------------------------------------------
1 | > **Important:** this may not work in Fedora in a TTY, at least Fedora 36 as it'll probably prevent input. More details in the long paragraph after the steps.
2 |
3 | > **Update Jan. 12, 2023:** See the end of this page for updated commands to run this inside another compositor.
4 |
5 | Running the custom compositor currently involves these commands:
6 | 1. Switch to a new TTY
7 | 2. Delete the Wayland lock file from `/run/user/1002/wayland-0.lock` (this path will vary depending on your installation) so Kwin doesn't interfere (if on Plasma Mobile)
8 | 3. CD into the folder with the compositor's files and run `python main.py -platform eglfs`
9 |
10 | > **Note:** if running this on postmarketOS, you ***must*** set `XDG_RUNTIME_DIR` to an existing, unused directory (or else everything will crash, requiring a hard reset by holding down the power button), like so:
11 | `XDG_RUNTIME_DIR=~/exampletempdir python main.py -platform eglfs`
12 | This directory needs `0755` permissions, apparently, so be sure to set that as well.
13 |
14 | > **Note 2:** for some reason, I can't switch to other TTYs while it's running. Maybe I should just try to make a set of plugins for Wayfire and drop my attempt at making a QtWayland compositor? Particularly as it's been really slow with touch point placement issues for the last several months... Or maybe I should just try to use something like WayQt (has Qt6 in the build options) as the compositor library, as wf-shell isn't on postmarketOS or Alpine for some reason (plus the last releases were a while ago)...
15 |
16 | These are copied from my demo video on the compositor here:
17 | https://youtube.com/shorts/jURqf86CS0I
18 |
19 | The last command is very important, because using `QT_QPA_PLATFORM=eglfs` before the command makes things break.
20 |
21 | Type `QT_SCALE_FACTOR=2` before the rest of the command to have everything at 200% scale, which is way easier to use.
22 |
23 | > As of sometime before December 20, 2022, the touch points for the compositor are all in the wrong place as you go down and toward the right side of the display in portrait mode on the PinePhone, and scrolling makes it worse. I have no idea what's going on and can't find any reports about it on Bing, so if anyone who's reading this has any idea, please let me know. It's really annoying and just bad. I know this bug existed at least a month or two before, and I didn't think I did anything so it might be Qt or Manjaro-related. I don't know. Edit: This issue seems like the same problem, but I don't know if Manjaro is on Qt6.4 yet (turns out it's on Qt6.4.1) : https://bugreports.qt.io/browse/QTBUG-105869?jql=project%20%3D%20QTBUG%20AND%20component%20%3D%20%22QPA%3A%20Wayland%22
24 |
25 | Please note that as of October 21, 2022, I'm not sure what's going on with the compositor on Fedora 36 KDE as in a TTY it will say it can't get devices and stops accepting input, at least under VMware Workstation. Maybe it would be fine on another desktop distro or under another hypervisor, like QEMU. Need to mainly test it under postmarketOS for now (**update Jan 11, 2023:** it doesn't work on postmarketOS edge right now, and it says something about the freedesktop runtime directory or something before briefly showing the navigation bar then having it disappear, which tells me it needs more investigation before it can run from a TTY by deleting `wayland-0.lock`), because it should be simplest to support that, then I can add support for other distros like Arch and Manjaro. Would be cool to also have Mobian and Fedora support, as well as every other distro intended for phones that's not too locked down from what I can tell like SailfishOS and UBports (nothing against them being locked down, just it could be difficult to change the UI). Eventually it could be used on desktops and laptops, but that's a ways off and would require a "desktop mode" that might be something between Windows 8.1 (maybe? maybe not, as the left-side switcher is more for tablets), Continuum, and full Windows 10. Would also have to add a way to switch between "phone mode", "tablet mode", "Continuum desktop mode", and "full desktop mode", and also have a setting that allows choosing between the "tablet" (because the external/secondary/tertiary/etc display could be a touchscreen and work better that way, or maybe the user prefers the tablet-first experience of Windows 8.x), "Continuum desktop" and "full desktop" modes when connecting a monitor, ideally storing configurations on a per-monitor basis so it's possible to have "phone mode" on the phone, "tablet mode" on an external touchscreen, and "Continuum desktop mode" on another screen. For obvious reasons, there should also be a setting to choose the default mode for the primary monitor when starting the device.
26 |
27 | Alternatively, you can try to run these commands to have it run inside another compositor, like Plasma Mobile's Kwin:
28 | 1. `cd RetiledCompositor/RetiledCompositor`
29 | 2. `export XDG_CURRENT_DESKTOP=KDE:X-Retiled` (may as well since we use Qt; causes KDE apps like the Plasma Mobile Settings app to work correctly as we're partially lying [kinda like IE11 Mobile] that we're KDE and thus apps listening for that will know to use KDE stuff to load data like themes and be displayed reasonably properly [`X-Retiled` is currently unused, but for now it's there so we're not entirely lying], but Angelfish seems to still have its address bar below the nav bar for some reason)
30 | 3. `python main.py -platform wayland --wayland-socket-name 2 &`
31 | 4. `export WAYLAND_DISPLAY=2`
32 | 5. `export QT_SCALE_FACTOR=2`
33 | 6. `cd ../../RetiledStart/RetiledStart/`
34 | 7. `python main.py`
35 |
36 | These worked once, but I don't know why they don't work when I try a second time (actually I think it's the setting the compositor environment variable part breaking it, so it needs to save the current value to another variable in the script then reload that variable after the compositor exits before the script quits). Also note that you should be able to just use the Start button in the compositor once you set the `WAYLAND_DISPLAY` export, but it doesn't work as intended so I may need to have it run `WAYLAND_DISPLAY=$WAYLAND_DISPLAY python main.py` when I work on it more. Still having issues with touch being in the wrong place, though, even on postmarketOS and Qt 6.4.1 or something.
37 |
--------------------------------------------------------------------------------
/RetiledStyles/ActionCenterActionButton.qml:
--------------------------------------------------------------------------------
1 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
2 | // Retiled project. Some code was copied from
3 | // the official qtdeclarative repo, which you can
4 | // access a copy of here:
5 | // https://github.com/DrewNaylor/qtdeclarative
6 | // Copyright (C) 2021-2023 Drew Naylor
7 | // (Note that the copyright years include the years left out by the hyphen.)
8 | // Windows Phone and all other related copyrights and trademarks are property
9 | // of Microsoft Corporation. All rights reserved.
10 | //
11 | // This file is a part of the RetiledStyles project, which is used by Retiled.
12 | // Neither Retiled nor Drew Naylor are associated with Microsoft
13 | // and Microsoft does not endorse Retiled.
14 | // Any other copyrights and trademarks belong to their
15 | // respective people and companies/organizations.
16 | //
17 | //
18 | // RetiledStyles is free software: you can redistribute it and/or modify
19 | // it under the terms of the GNU Lesser General Public License
20 | // version 3 as published by the Free Software Foundation.
21 | // All files in this repo (Retiled) licensed under the Apache License, 2.0,
22 | // are using RetiledStyles under the LGPLv3.
23 | //
24 | // Alternatively, this file may be used under the terms of the GNU
25 | // General Public License version 2.0 or later as published by the Free
26 | // Software Foundation and appearing in the file LICENSE.GPL included in
27 | // the packaging of this file. Please review the following information to
28 | // ensure the GNU General Public License version 2.0 requirements will be
29 | // met: http://www.gnu.org/licenses/gpl-2.0.html.
30 | //
31 | // This program is distributed in the hope that it will be useful,
32 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 | // GNU (Lesser) General Public License for more details.
35 | //
36 | // You should have received a copy of the GNU (Lesser) General Public License
37 | // along with this program. If not, see .
38 |
39 | // This is one of the buttons at the top of the Action Center.
40 | import "." as RetiledStyles
41 | import QtQuick
42 | import QtQuick.Controls
43 | import QtQuick.Controls.Universal
44 |
45 | RetiledStyles.Button {
46 | // Set borderWidth to 0.
47 | // TODO: Allow setting border width for these.
48 | borderWidth: 0
49 | // TODO: Allow setting radius for Action Center Action Buttons,
50 | // like ordinary buttons and tiles.
51 | // Set width and height.
52 | // These are roughly what the 720p 4.7-inch emulator has at 50% scale.
53 | // If these don't feel that good on a phone, they can be changed.
54 | buttonWidth: 86
55 | buttonHeight: 58
56 | // Add property for button color when it's toggled on.
57 | // This is the accent color, cobalt (#0050ef) by default.
58 | // TODO: Allow this to be overridden by themes so they can
59 | // use a different color.
60 | property string toggledOnColor: accentColor
61 | // Unpressed background color will use the toggledOnColor
62 | // to ensure things don't break.
63 | unpressedBackgroundColor: isToggled ? toggledOnColor : toggledOffColor
64 | pressedBackgroundColor: isToggled ? toggledOnColor : toggledOffColor
65 | // Add property for toggled-off button color.
66 | // This is the same as displayed in the emulator.
67 | property string toggledOffColor: ThemeLoader.getValueFromTheme(themePath, "ActionCenterActionButton", "ToggledOffBackgroundColor", "#1f1f1f")
68 |
69 | // Property for button text color.
70 | property string actionCenterActionButtonTextColor: ThemeLoader.getValueFromTheme(themePath, "ActionCenterActionButton", "ActionButtonTextColor", "white")
71 | // Specify whether this button can be toggled.
72 | // TODO: Allow multi-state buttons, such as for display brightness.
73 | // By default it's a toggle button for testing.
74 | property bool canToggle: true
75 | // Specify whether the button is currently toggled.
76 | property bool isToggled: false
77 |
78 | // Property for setting the text on a specific Action Center button.
79 | property string actionCenterButtonText: "(null)"
80 |
81 | // Property for setting whether the text should be all-caps or lowercase.
82 | // This is for accessibility purposes to help screen readers and should also help anyone that doesn't
83 | // like stuff in all-caps because it feels like it's yelling at them.
84 | // Currently unused.
85 | // NOTE: We'll use the font property to have text render as lowercase,
86 | // rather than directly using ".toLower" or something.
87 | // That way it should be fine for screen readers.
88 | property bool textIsLowercase: false
89 |
90 | // Property for storing the command the button can use.
91 | property string buttonCommand;
92 |
93 | // Signal for running the button's command.
94 | signal runCommand(string buttonCommand);
95 |
96 | // Clip the contents of the button so it doesn't go outside its area.
97 | clip: true
98 |
99 | // Switch the button between toggled on and off states.
100 | // We have to use onReleased because QML doesn't let onClicked
101 | // events go as quickly as I want to allow.
102 | onReleased: {
103 | if ((canToggle == true) && (isToggled == false)) {
104 | // Toggle the button on.
105 | isToggled = true;
106 | //console.log(isToggled);
107 | } else if ((canToggle == true) && (isToggled == true)) {
108 | // Toggle the button off.
109 | isToggled = false;
110 | //console.log(isToggled);
111 | }
112 | // Run the command that's supposed to happen when pressing the button.
113 | // TODO: Make sure the button has a command, or don't have it run.
114 | // TODO 2: Block the button from being used if its command can't be used
115 | // right now, but this will probably be somewhere else.
116 | runCommand(buttonCommand);
117 | }
118 |
119 | Text {
120 | font.pointSize: RetiledStyles.FontStyles.extraextrasmallFontSize
121 | text: actionCenterButtonText
122 | //text: "FLASHLIGHT"
123 | //text: "ROTATION LOCK"
124 | //text: "AIRPLANE\nMODE"
125 | color: actionCenterActionButtonTextColor
126 | }
127 |
128 | }
129 |
--------------------------------------------------------------------------------
/RetiledStyles/AppBarBase.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | **
3 | ** Copyright (C) 2017 The Qt Company Ltd.
4 | ** Contact: http://www.qt.io/licensing/
5 | **
6 | ** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
7 | **
8 | ** $QT_BEGIN_LICENSE:LGPL3$
9 | ** Commercial License Usage
10 | ** Licensees holding valid commercial Qt licenses may use this file in
11 | ** accordance with the commercial license agreement provided with the
12 | ** Software or, alternatively, in accordance with the terms contained in
13 | ** a written agreement between you and The Qt Company. For licensing terms
14 | ** and conditions see http://www.qt.io/terms-conditions. For further
15 | ** information use the contact form at http://www.qt.io/contact-us.
16 | **
17 | ** GNU Lesser General Public License Usage
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser
19 | ** General Public License version 3 as published by the Free Software
20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the
21 | ** packaging of this file. Please review the following information to
22 | ** ensure the GNU Lesser General Public License version 3 requirements
23 | ** will be met: https://www.gnu.org/licenses/lgpl.html.
24 | **
25 | ** GNU General Public License Usage
26 | ** Alternatively, this file may be used under the terms of the GNU
27 | ** General Public License version 2.0 or later as published by the Free
28 | ** Software Foundation and appearing in the file LICENSE.GPL included in
29 | ** the packaging of this file. Please review the following information to
30 | ** ensure the GNU General Public License version 2.0 requirements will be
31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html.
32 | **
33 | ** $QT_END_LICENSE$
34 | **
35 | ****************************************************************************/
36 |
37 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
38 | // Retiled project. Some code was copied from
39 | // the official qtdeclarative repo, which you can
40 | // access a copy of here:
41 | // https://github.com/DrewNaylor/qtdeclarative
42 | // Modifications to this file are Copyright (C) 2021-2023 Drew Naylor
43 | // and are overall licensed under the LGPLv3 and the GPLv2+ as described in
44 | // Qt's license block above, so you can choose which you use this under.
45 | // Any file in this repo (Retiled) that is licensed under the Apache License, 2.0, and
46 | // uses this file is using it under the LGPLv3.
47 | // Please refer to The Qt Company's copyrights above
48 | // for the copyrights to the original file.
49 | // (Note that the copyright years include the years left out by the hyphen.)
50 | // Windows Phone and all other related copyrights and trademarks are property
51 | // of Microsoft Corporation. All rights reserved.
52 | //
53 | // This file was modified from the original QtQuick Controls source.
54 | // In particular, I took code from the Universal style's "Button.qml" file.
55 | // You can get a copy of the source from here:
56 | // https://github.com/DrewNaylor/qtdeclarative
57 | //
58 | // This file is a part of the RetiledStyles project, which is used by Retiled.
59 | // Neither Retiled nor Drew Naylor are associated with Microsoft
60 | // and Microsoft does not endorse Retiled.
61 | // Any other copyrights and trademarks belong to their
62 | // respective people and companies/organizations.
63 | //
64 | //
65 | // Please refer to the licensing info above for the licenses this file falls
66 | // under.
67 |
68 |
69 | import QtQuick
70 | import QtQuick.Templates as T
71 | import QtQuick.Controls.Universal
72 |
73 | T.ToolBar {
74 | id: control
75 |
76 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
77 | contentWidth + leftPadding + rightPadding)
78 |
79 | // When minimized is true, use size 24 appbars, otherwise use 48.
80 | // We also check to see if the appbar drawer position
81 | // is 0.0, meaning it's closed, and otherwise we set it to
82 | // the full height.
83 | // TODO: Should the appbar drawer position we check for
84 | // be a different value? Should it be less than 1.0 or something?
85 | // We also need to override the appbar height if the back button
86 | // is visible.
87 | implicitHeight: minimized && appbarDrawer.position === 0.0 && backButtonVisible === false ? 24 : 48
88 |
89 | // Allow appbars to appear minimized.
90 | property bool minimized: false
91 |
92 | // #212021 is the hex color code for the dark appbar color
93 | // as sampled from a screenshot.
94 | // I should probably figure out how to just change the
95 | // Universal theme directly, so I can use values from it.
96 | // We're setting this here so apps using the appbar can set its color.
97 | // Actually that was the wrong color, it's supposed to be
98 | // #1f1f1f.
99 | // TODO: move this to another file so it can just be referenced
100 | // along with all the other light and dark theme colors.
101 | // This will still be able to be overridden in case an app
102 | // wants a specific color for the appbar drawer.
103 | property string backgroundColor: ThemeLoader.getValueFromTheme(themePath, "AppBar", "BackgroundColor", "#1f1f1f")
104 |
105 | background: Rectangle {
106 | // TODO: figure out how to have different-height appbars when they're closed
107 | // to support both display styles (where they show buttons and when they
108 | // don't).
109 | // When minimized is true, use size 24 appbars, otherwise use 48.
110 | // We also check to see if the appbar drawer position
111 | // is 0.0, meaning it's closed, and otherwise we set it to
112 | // the full height.
113 | // TODO: Should the appbar drawer position we check for
114 | // be a different value? Should it be less than 1.0 or something?
115 | // We also need to override the appbar height if the back button
116 | // is visible.
117 | height: minimized && appbarDrawer.position === 0.0 && backButtonVisible === false ? 24 : 48
118 | // Set background color.
119 | color: backgroundColor
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/RetiledStyles/AppBarDrawerEntry.qml:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | **
3 | ** Copyright (C) 2017 The Qt Company Ltd.
4 | ** Contact: http://www.qt.io/licensing/
5 | **
6 | ** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
7 | **
8 | ** $QT_BEGIN_LICENSE:LGPL3$
9 | ** Commercial License Usage
10 | ** Licensees holding valid commercial Qt licenses may use this file in
11 | ** accordance with the commercial license agreement provided with the
12 | ** Software or, alternatively, in accordance with the terms contained in
13 | ** a written agreement between you and The Qt Company. For licensing terms
14 | ** and conditions see http://www.qt.io/terms-conditions. For further
15 | ** information use the contact form at http://www.qt.io/contact-us.
16 | **
17 | ** GNU Lesser General Public License Usage
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser
19 | ** General Public License version 3 as published by the Free Software
20 | ** Foundation and appearing in the file LICENSE.LGPLv3 included in the
21 | ** packaging of this file. Please review the following information to
22 | ** ensure the GNU Lesser General Public License version 3 requirements
23 | ** will be met: https://www.gnu.org/licenses/lgpl.html.
24 | **
25 | ** GNU General Public License Usage
26 | ** Alternatively, this file may be used under the terms of the GNU
27 | ** General Public License version 2.0 or later as published by the Free
28 | ** Software Foundation and appearing in the file LICENSE.GPL included in
29 | ** the packaging of this file. Please review the following information to
30 | ** ensure the GNU General Public License version 2.0 requirements will be
31 | ** met: http://www.gnu.org/licenses/gpl-2.0.html.
32 | **
33 | ** $QT_END_LICENSE$
34 | **
35 | ****************************************************************************/
36 |
37 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
38 | // Retiled project. Some code was copied from
39 | // the official qtdeclarative repo, which you can
40 | // access a copy of here:
41 | // https://github.com/DrewNaylor/qtdeclarative
42 | // Modifications to this file are Copyright (C) 2021-2023 Drew Naylor
43 | // and are overall licensed under the LGPLv3 and the GPLv2+ as described in
44 | // Qt's license block above, so you can choose which you use this under.
45 | // Any file in this repo (Retiled) that is licensed under the Apache License, 2.0, and
46 | // uses this file is using it under the LGPLv3.
47 | // Please refer to The Qt Company's copyrights above
48 | // for the copyrights to the original file.
49 | // (Note that the copyright years include the years left out by the hyphen.)
50 | // Windows Phone and all other related copyrights and trademarks are property
51 | // of Microsoft Corporation. All rights reserved.
52 | //
53 | // This file was modified from the original QtQuick Controls source.
54 | // In particular, I took code from the Universal style's "ItemDelegate.qml" file.
55 | // You can get a copy of the source from here:
56 | // https://github.com/DrewNaylor/qtdeclarative
57 | //
58 | // This file is a part of the RetiledStyles project, which is used by Retiled.
59 | // Neither Retiled nor Drew Naylor are associated with Microsoft
60 | // and Microsoft does not endorse Retiled.
61 | // Any other copyrights and trademarks belong to their
62 | // respective people and companies/organizations.
63 | //
64 | //
65 | // Please refer to the licensing info above for the licenses this file falls
66 | // under.
67 |
68 | import "."
69 | import QtQuick
70 | import QtQuick.Templates as T
71 | import QtQuick.Controls.impl
72 | import QtQuick.Controls.Universal
73 |
74 | T.ItemDelegate {
75 | id: control
76 |
77 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
78 | implicitContentWidth + leftPadding + rightPadding)
79 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
80 | implicitContentHeight + topPadding + bottomPadding,
81 | implicitIndicatorHeight + topPadding + bottomPadding)
82 |
83 | spacing: 12
84 |
85 | padding: 12
86 | topPadding: padding - 1
87 | bottomPadding: padding + 1
88 |
89 | // Scale it down like a button.
90 | scale: down ? 0.98 : 1.0
91 |
92 | // Tilt angle for the tilt effect.
93 | property int tiltAngle: 15
94 |
95 | // Have buttons tilt toward the cursor or
96 | // touch point when pressed, like Windows Phone.
97 | // The code was moved to TiltEffect.qml so it can be
98 | // easily shared with other elements that don't
99 | // inherit from ButtonBase.
100 | transform: TiltEffect {}
101 |
102 | icon.width: 20
103 | icon.height: 20
104 | // TODO: Allow this color to be set by themes.
105 | icon.color: Color.transparent(Universal.foreground, enabled ? 1.0 : 0.2)
106 |
107 | contentItem: IconLabel {
108 | spacing: control.spacing
109 | mirrored: control.mirrored
110 | display: control.display
111 | alignment: control.display === IconLabel.IconOnly || control.display === IconLabel.TextUnderIcon ? Qt.AlignCenter : Qt.AlignLeft
112 |
113 | icon: control.icon
114 | text: control.text
115 | // Change font to Inter Display and do the other stuff.
116 | font.family: FontStyles.regularFont
117 | font.pointSize: FontStyles.normalFontSize
118 | font.weight: FontStyles.regularFontWeight
119 | // Actually I'm not sure about using letter spacing now.
120 | //font.letterSpacing: -0.8 * scaleFactor
121 | // TODO: Allow this color to be set by themes.
122 | color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
123 | }
124 |
125 | background: Rectangle {
126 | // TODO: Allow the colors here to be set by themes.
127 | visible: control.down || control.highlighted || control.visualFocus || control.hovered
128 | color: "transparent"
129 | Rectangle {
130 | width: parent.width
131 | height: parent.height
132 | visible: control.visualFocus || control.highlighted
133 | color: control.Universal.accent
134 | opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
135 | }
136 |
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/RetiledStyles/AppBarDrawer.qml:
--------------------------------------------------------------------------------
1 | // RetiledStyles - Windows Phone 8.x-like QML styles for the
2 | // Retiled project. Some code was copied from
3 | // the official qtdeclarative repo, which you can
4 | // access a copy of here:
5 | // https://github.com/DrewNaylor/qtdeclarative
6 | // Copyright (C) 2021-2023 Drew Naylor
7 | // (Note that the copyright years include the years left out by the hyphen.)
8 | // Windows Phone and all other related copyrights and trademarks are property
9 | // of Microsoft Corporation. All rights reserved.
10 | //
11 | // This file is a part of the RetiledStyles project, which is used by Retiled.
12 | // Neither Retiled nor Drew Naylor are associated with Microsoft
13 | // and Microsoft does not endorse Retiled.
14 | // Any other copyrights and trademarks belong to their
15 | // respective people and companies/organizations.
16 | //
17 | //
18 | // RetiledStyles is free software: you can redistribute it and/or modify
19 | // it under the terms of the GNU Lesser General Public License
20 | // version 3 as published by the Free Software Foundation.
21 | // All files in this repo (Retiled) licensed under the Apache License, 2.0,
22 | // are using RetiledStyles under the LGPLv3.
23 | //
24 | // Alternatively, this file may be used under the terms of the GNU
25 | // General Public License version 2.0 or later as published by the Free
26 | // Software Foundation and appearing in the file LICENSE.GPL included in
27 | // the packaging of this file. Please review the following information to
28 | // ensure the GNU General Public License version 2.0 requirements will be
29 | // met: http://www.gnu.org/licenses/gpl-2.0.html.
30 | //
31 | // This program is distributed in the hope that it will be useful,
32 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
33 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 | // GNU (Lesser) General Public License for more details.
35 | //
36 | // You should have received a copy of the GNU (Lesser) General Public License
37 | // along with this program. If not, see .
38 |
39 |
40 | // Importing everything in this folder
41 | // until I can figure out a better solution.
42 | import "." as RetiledStyles
43 | import QtQuick
44 | import QtQuick.Controls
45 |
46 |
47 |
48 | RetiledStyles.AppBarDrawerBase {
49 | // TODO: Figure out a way to allow the drawer to be closed from any
50 | // page and not just from clicking inside the main page or clicking
51 | // on any of the items in the drawer.
52 | // TODO 2: Figure out how to let the user drag the app bar back down
53 | // on both the right and the left side to close the
54 | // drawer, like on Windows Phone.
55 | // TODO 3: Move the customizations to AppBarDrawer.qml so that
56 | // more apps can use this customized appbar drawer.
57 | // TODO 4: Prevent the appbar drawer from being able to be closed
58 | // by dragging downward on the items in it or by clicking anywhere
59 | // on the appbar other than the ellipsis/more button or the empty
60 | // spot on the left side of the appbar.
61 | id: control
62 | width: window.width
63 | // Set height to 165 so that there's enough space for the pages,
64 | // but allow it to be changed by apps.
65 | property int appbarDrawerHeight: 165
66 | height: appbarDrawerHeight
67 | // Not sure what Interactive means, but I'll guess it determines
68 | // if you can interact with the app drawer.
69 | interactive: stackView.depth === 1
70 | // Setting edge to Qt.BottomEdge makes the menu
71 | // kinda look like WP's ellipsis menu, except it
72 | // doesn't yet move the bar up. Maybe a translation
73 | // thing will help with that.
74 | // Edge documentation:
75 | // https://doc.qt.io/qt-5/qml-qtquick-controls2-drawer.html#edge-prop
76 | edge: Qt.BottomEdge
77 |
78 | // Set font.
79 | font.family: RetiledStyles.FontStyles.semiboldFont
80 | font.weight: RetiledStyles.FontStyles.semiboldFontWeight
81 | // TODO: Move letter spacing into the control.
82 | //font.letterSpacing: -0.8 * scaleFactor
83 |
84 | property ListModel drawerItems;
85 |
86 |
87 | // Removing the shadow from the drawer:
88 | // https://stackoverflow.com/a/63411102
89 |
90 |
91 | Rectangle {
92 | // You have to set this rectangle's color
93 | // or else it'll be white.
94 | anchors.fill: parent
95 | color: "transparent"
96 |
97 |
98 | // TODO: Figure out how to have tabbing and arrow keys work correctly in the appbar drawer
99 | // and the appbar itself, once that's implemented.
100 | ListView {
101 | id: appbarDrawerListView
102 | anchors.fill: parent
103 | clip: true
104 | focus: true
105 |
106 | delegate: RetiledStyles.AppBarDrawerEntry {
107 | width: parent.width
108 | text: model.title
109 | onClicked: {
110 | // Only navigate to another page if the item says to.
111 | // Sometimes you don't want to navigate, so that's why
112 | // it has to be specified.
113 | if (model.navigate === "true"){
114 | stackView.push(model.source)
115 | // Set the appbar drawer's color to transparent.
116 | control.backgroundColor = "transparent"
117 | // Close the appbar drawer.
118 | control.close()
119 | // Show the back button to allow navigating back.
120 | backButtonVisible = true
121 | // Have the appbar be transparent.
122 | appBar.backgroundColor = "transparent"
123 | // Hide the ellipsis button.
124 | appbarEllipsisButtonVisible = false
125 | } else {
126 | // This is just a test for now to allow commands
127 | // to be used from the appbar.
128 | // An example would be pinning something to Start.
129 | console.log(model.command)
130 | // We should also close the appbar drawer.
131 | control.close()
132 | }
133 |
134 | }
135 | }
136 |
137 | // Note: these pages here will eventually be replaced
138 | // with items that would be in a settings app's appbar drawer,
139 | // and not ones that are now in the main list.
140 | model: drawerItems
141 |
142 | // TODO: Improve the shape of the scrollbar
143 | // so it's closer to WP.
144 | ScrollIndicator.vertical: ScrollIndicator { }
145 | }
146 | }
147 | }
--------------------------------------------------------------------------------