├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── QFluentWidgets.pro ├── QFramelessWindow ├── QFramelessWindow.cpp ├── QFramelessWindow.h ├── QFramelessWindow.pro ├── images │ └── close.svg ├── qframelesswindow.qrc ├── titlebar │ ├── TitleBar.cpp │ ├── TitleBar.h │ ├── TitleBarButton.cpp │ └── TitleBarButton.h ├── utils │ ├── Win32Utils.cpp │ └── Win32Utils.h ├── widgetResizeHandler │ ├── WidgetResizeHandler.cpp │ └── WidgetResizeHandler.h └── windows │ ├── WindowCompositionAttribute.h │ ├── WindowsFramelessDialog.cpp │ ├── WindowsFramelessDialog.h │ ├── WindowsFramelessHelper.cpp │ ├── WindowsFramelessHelper.h │ ├── WindowsFramelessWidget.cpp │ ├── WindowsFramelessWidget.h │ ├── WindowsFramelessWindow.cpp │ ├── WindowsFramelessWindow.h │ ├── WindowsWindowEffect.cpp │ └── WindowsWindowEffect.h ├── README.md ├── examples ├── AcrylicLabelDemo │ ├── AcrylicLabelDemo.pro │ └── main.cpp ├── ButtonDemo │ ├── ButtonDemo.pro │ └── main.cpp ├── CheckBoxDemo │ ├── CheckBoxDemo.pro │ └── main.cpp ├── ColorDialogDemo │ ├── ColorDialogDemo.pro │ └── main.cpp ├── ComboBoxDemo │ ├── ComboBoxDemo.pro │ ├── main.cpp │ ├── res.qrc │ └── res │ │ ├── arrow_down.png │ │ ├── arrow_up.png │ │ └── style.qss ├── DialogDemo │ ├── DialogDemo.pro │ ├── MainWindow.cpp │ ├── MainWindow.h │ └── main.cpp ├── FlowLayoutDemo │ ├── FlowLayoutDemo.pro │ └── main.cpp ├── FolderListDialogDemo │ ├── FolderListDialogDemo.pro │ └── main.cpp ├── InfoBarDemo │ ├── InfoBarDemo.pro │ └── main.cpp ├── LineEditDemo │ ├── LineEditDemo.pro │ └── main.cpp ├── MessageDialogDemo │ ├── MessageDialogDemo.pro │ └── main.cpp ├── NavigationDemo │ ├── NavigationDemo.pro │ ├── main.cpp │ ├── res.qrc │ └── resource │ │ ├── dark │ │ └── demo.qss │ │ ├── light │ │ └── demo.qss │ │ ├── logo.png │ │ └── shoko.png ├── QFramelessWindowDemo │ ├── AWindow.cpp │ ├── AWindow.h │ ├── DWindow.cpp │ ├── DWindow.h │ ├── FWindow.cpp │ ├── FWindow.h │ ├── MainWindow.cpp │ ├── MainWindow.h │ ├── MainWindow.ui │ ├── QFramelessWindowDemo.pro │ ├── images.qrc │ ├── images │ │ ├── acrylic_window.jpg │ │ ├── cover.jpg │ │ ├── logo.png │ │ ├── normal_frameless_window.gif │ │ └── shoko.png │ └── main.cpp ├── RadioButtonDemo │ ├── RadioButtonDemo.pro │ └── main.cpp ├── ScrollAreaDemo │ ├── Dialog.cpp │ ├── Dialog.h │ ├── Dialog.ui │ ├── ScrollAreaDemo.pro │ ├── main.cpp │ ├── res.qrc │ └── resource │ │ ├── demo.qss │ │ └── shoko.jpg ├── SliderDemo │ ├── MainWindow.cpp │ ├── MainWindow.h │ ├── SliderDemo.pro │ └── main.cpp ├── SpinBoxDemo │ ├── SpinBoxDemo.pro │ └── main.cpp ├── StateToolTipDemo │ ├── StateToolTipDemo.pro │ └── main.cpp ├── SwitchButtonDemo │ ├── SwitchButtonDemo.pro │ └── main.cpp ├── TimePickerDemo │ ├── TimePickerDemo.pro │ └── main.cpp ├── ToolTipDemo │ ├── ToolTipDemo.pro │ └── main.cpp ├── TreeViewDemo │ ├── TreeViewDemo.pro │ └── main.cpp ├── baseconfig.pri ├── example.pro ├── framelesswindow │ ├── AcrylicDemo.cpp │ ├── AcrylicDemo.h │ ├── CustomWidget.cpp │ ├── CustomWidget.h │ ├── Dialog.cpp │ ├── Dialog.h │ ├── MainWindow.cpp │ ├── MainWindow.h │ ├── MainWindow.ui │ ├── Widget.cpp │ ├── Widget.h │ ├── framelesswindow.pro │ └── main.cpp ├── gallery │ ├── MainWindow.ui │ ├── common │ │ ├── GalleryConfig.cpp │ │ ├── GalleryConfig.h │ │ ├── GalleryIcon.cpp │ │ ├── GalleryIcon.h │ │ ├── GalleryStyleSheet.cpp │ │ ├── GalleryStyleSheet.h │ │ ├── SignalBus.cpp │ │ ├── SignalBus.h │ │ ├── Translator.cpp │ │ ├── Translator.h │ │ ├── Trie.cpp │ │ └── Trie.h │ ├── components │ │ ├── AvatarWidget.cpp │ │ ├── AvatarWidget.h │ │ ├── LinkCard.cpp │ │ ├── LinkCard.h │ │ ├── SampleCard.cpp │ │ └── SampleCard.h │ ├── gallery.pro │ ├── main.cpp │ ├── resource.qrc │ ├── resource │ │ ├── i18n │ │ │ ├── gallery_hk.qm │ │ │ ├── gallery_hk.ts │ │ │ ├── gallery_zh.qm │ │ │ ├── gallery_zh.ts │ │ │ ├── qfluentwidgets_hk.qm │ │ │ ├── qfluentwidgets_hk.ts │ │ │ ├── qfluentwidgets_zh.qm │ │ │ └── qfluentwidgets_zh.ts │ │ ├── images │ │ │ ├── chidanta.jpg │ │ │ ├── chidanta2.jpg │ │ │ ├── chidanta3.jpg │ │ │ ├── controls │ │ │ │ ├── Acrylic.png │ │ │ │ ├── AnimatedIcon.png │ │ │ │ ├── AnimatedVisualPlayer.png │ │ │ │ ├── AnimationInterop.png │ │ │ │ ├── AppBarButton.png │ │ │ │ ├── AppBarSeparator.png │ │ │ │ ├── AppBarToggleButton.png │ │ │ │ ├── AutoSuggestBox.png │ │ │ │ ├── AutomationProperties.png │ │ │ │ ├── Border.png │ │ │ │ ├── BreadcrumbBar.png │ │ │ │ ├── Button.png │ │ │ │ ├── CalendarDatePicker.png │ │ │ │ ├── CalendarView.png │ │ │ │ ├── Canvas.png │ │ │ │ ├── Checkbox.png │ │ │ │ ├── Clipboard.png │ │ │ │ ├── ColorPaletteResources.png │ │ │ │ ├── ColorPicker.png │ │ │ │ ├── ComboBox.png │ │ │ │ ├── CommandBar.png │ │ │ │ ├── CommandBarFlyout.png │ │ │ │ ├── CompactSizing.png │ │ │ │ ├── ConnectedAnimation.png │ │ │ │ ├── ContentDialog.png │ │ │ │ ├── CreateMultipleWindows.png │ │ │ │ ├── DataGrid.png │ │ │ │ ├── DatePicker.png │ │ │ │ ├── DropDownButton.png │ │ │ │ ├── EasingFunction.png │ │ │ │ ├── Expander.png │ │ │ │ ├── FilePicker.png │ │ │ │ ├── FlipView.png │ │ │ │ ├── Flyout.png │ │ │ │ ├── Grid.png │ │ │ │ ├── GridView.png │ │ │ │ ├── HyperlinkButton.png │ │ │ │ ├── IconElement.png │ │ │ │ ├── Image.png │ │ │ │ ├── ImplicitTransition.png │ │ │ │ ├── InfoBadge.png │ │ │ │ ├── InfoBar.png │ │ │ │ ├── InkCanvas.png │ │ │ │ ├── InkToolbar.png │ │ │ │ ├── InputValidation.png │ │ │ │ ├── ItemsRepeater.png │ │ │ │ ├── Line.png │ │ │ │ ├── ListBox.png │ │ │ │ ├── ListView.png │ │ │ │ ├── MediaPlayerElement.png │ │ │ │ ├── MenuBar.png │ │ │ │ ├── MenuFlyout.png │ │ │ │ ├── NavigationView.png │ │ │ │ ├── NumberBox.png │ │ │ │ ├── PageTransition.png │ │ │ │ ├── ParallaxView.png │ │ │ │ ├── PasswordBox.png │ │ │ │ ├── PersonPicture.png │ │ │ │ ├── PipsPager.png │ │ │ │ ├── Pivot.png │ │ │ │ ├── ProgressBar.png │ │ │ │ ├── ProgressRing.png │ │ │ │ ├── PullToRefresh.png │ │ │ │ ├── RadialGradientBrush.png │ │ │ │ ├── RadioButton.png │ │ │ │ ├── RadioButtons.png │ │ │ │ ├── RatingControl.png │ │ │ │ ├── RelativePanel.png │ │ │ │ ├── RepeatButton.png │ │ │ │ ├── RevealFocus.png │ │ │ │ ├── RichEditBox.png │ │ │ │ ├── RichTextBlock.png │ │ │ │ ├── ScrollViewer.png │ │ │ │ ├── SemanticZoom.png │ │ │ │ ├── Shape.png │ │ │ │ ├── Slider.png │ │ │ │ ├── Sound.png │ │ │ │ ├── SplitButton.png │ │ │ │ ├── SplitView.png │ │ │ │ ├── StackPanel.png │ │ │ │ ├── StandardUICommand.png │ │ │ │ ├── SwipeControl.png │ │ │ │ ├── TabView.png │ │ │ │ ├── TeachingTip.png │ │ │ │ ├── TextBlock.png │ │ │ │ ├── TextBox.png │ │ │ │ ├── ThemeTransition.png │ │ │ │ ├── TimePicker.png │ │ │ │ ├── TitleBar.png │ │ │ │ ├── ToggleButton.png │ │ │ │ ├── ToggleSplitButton.png │ │ │ │ ├── ToggleSwitch.png │ │ │ │ ├── ToolTip.png │ │ │ │ ├── TreeView.png │ │ │ │ ├── VariableSizedWrapGrid.png │ │ │ │ ├── Viewbox.png │ │ │ │ ├── WebView.png │ │ │ │ └── XamlUICommand.png │ │ │ ├── header.png │ │ │ ├── header1.png │ │ │ ├── icons │ │ │ │ ├── EmojiTabSymbols_black.svg │ │ │ │ ├── EmojiTabSymbols_white.svg │ │ │ │ ├── Grid_black.svg │ │ │ │ ├── Grid_white.svg │ │ │ │ ├── Menu_black.svg │ │ │ │ ├── Menu_white.svg │ │ │ │ ├── Text_black.svg │ │ │ │ └── Text_white.svg │ │ │ ├── kunkun.png │ │ │ ├── logo.png │ │ │ └── shoko.png │ │ └── qss │ │ │ ├── dark │ │ │ ├── gallery_interface.qss │ │ │ ├── home_interface.qss │ │ │ ├── icon_interface.qss │ │ │ ├── link_card.qss │ │ │ ├── main_window.qss │ │ │ ├── sample_card.qss │ │ │ ├── setting_interface.qss │ │ │ └── view_interface.qss │ │ │ └── light │ │ │ ├── gallery_interface.qss │ │ │ ├── home_interface.qss │ │ │ ├── icon_interface.qss │ │ │ ├── link_card.qss │ │ │ ├── main_window.qss │ │ │ ├── sample_card.qss │ │ │ ├── setting_interface.qss │ │ │ └── view_interface.qss │ └── view │ │ ├── BasicInputInterface.cpp │ │ ├── BasicInputInterface.h │ │ ├── DateTimeInterface.cpp │ │ ├── DateTimeInterface.h │ │ ├── DialogInterface.cpp │ │ ├── DialogInterface.h │ │ ├── GalleryInterface.cpp │ │ ├── GalleryInterface.h │ │ ├── GalleryTitleBar.cpp │ │ ├── GalleryTitleBar.h │ │ ├── HomeInterface.cpp │ │ ├── HomeInterface.h │ │ ├── IconInterface.cpp │ │ ├── IconInterface.h │ │ ├── LayoutInterface.cpp │ │ ├── LayoutInterface.h │ │ ├── MainWindow.cpp │ │ ├── MainWindow.h │ │ ├── MaterialInterface.cpp │ │ ├── MaterialInterface.h │ │ ├── MenuInterface.cpp │ │ ├── MenuInterface.h │ │ ├── ScrollInterface.cpp │ │ ├── ScrollInterface.h │ │ ├── SettingInterface.cpp │ │ ├── SettingInterface.h │ │ ├── StatusInfoInterface.cpp │ │ ├── StatusInfoInterface.h │ │ ├── TextInterface.cpp │ │ ├── TextInterface.h │ │ ├── ViewInterface.cpp │ │ └── ViewInterface.h ├── openglwidget │ ├── GLWidget.cpp │ ├── GLWidget.h │ ├── Logo.cpp │ ├── Logo.h │ ├── MainWindow.cpp │ ├── MainWindow.h │ ├── images.qrc │ ├── images │ │ └── qtlogo.png │ ├── main.cpp │ └── openglwidget.pro └── share.pri ├── share ├── install.cmake ├── msbuild │ └── QFluentWidgets.props.in └── qmake │ └── QFUIWidgets.pri.in └── src ├── CMakeLists.txt ├── QFluentWidgetsConfig.cmake.in └── core ├── CMakeLists.txt ├── Common ├── AutoWrap.cpp ├── AutoWrap.h ├── Config.cpp ├── Config.h ├── Icon.cpp ├── Icon.h ├── ImageUtils.cpp ├── ImageUtils.h ├── SmoothScroll.cpp ├── SmoothScroll.h ├── StyleSheet.cpp ├── StyleSheet.h ├── Theme.h └── enum.h ├── DateTime ├── DatePicker.cpp ├── DatePicker.h ├── PickerBase.cpp ├── PickerBase.h ├── TimePicker.cpp └── TimePicker.h ├── DialogBox ├── ColorDialog.cpp ├── ColorDialog.h ├── Dialog.cpp ├── Dialog.h ├── FolderListDialog.cpp ├── FolderListDialog.h ├── HuePanel.cpp ├── HuePanel.h ├── MaskDialogBase.cpp ├── MaskDialogBase.h ├── MessageDialog.cpp └── MessageDialog.h ├── Layout ├── ExpandLayout.cpp ├── ExpandLayout.h ├── FlowLayout.cpp ├── FlowLayout.h ├── VBoxLayout.cpp └── VBoxLayout.h ├── Navigation ├── NavigationInterface.cpp ├── NavigationInterface.h ├── NavigationPanel.cpp ├── NavigationPanel.h ├── NavigationWidget.cpp └── NavigationWidget.h ├── QFluentWidgets.cpp ├── QFluentWidgets.h ├── QFluentWidgets.pro ├── Settings ├── CustomColorSettingCard.cpp ├── CustomColorSettingCard.h ├── ExpandGroupSettingCard.cpp ├── ExpandGroupSettingCard.h ├── FolderListSettingCard.cpp ├── FolderListSettingCard.h ├── OptionsSettingCard.cpp ├── OptionsSettingCard.h ├── SettingCard.cpp ├── SettingCard.h ├── SettingCardGroup.cpp └── SettingCardGroup.h ├── Widgets ├── AcrylicLabel.cpp ├── AcrylicLabel.h ├── Button.cpp ├── Button.h ├── CheckBox.cpp ├── CheckBox.h ├── ComboBox.cpp ├── ComboBox.h ├── CycleListWidget.cpp ├── CycleListWidget.h ├── IconWidget.cpp ├── IconWidget.h ├── InfoBar.cpp ├── InfoBar.h ├── Label.cpp ├── Label.h ├── LineEdit.cpp ├── LineEdit.h ├── Menu.cpp ├── Menu.h ├── MultiSelectComboBox.cpp ├── MultiSelectComboBox.h ├── ScrollArea.cpp ├── ScrollArea.h ├── Slider.cpp ├── Slider.h ├── SpinBox.cpp ├── SpinBox.h ├── StackedWidget.cpp ├── StackedWidget.h ├── StateToolTip.cpp ├── StateToolTip.h ├── SwitchButton.cpp ├── SwitchButton.h ├── ThreeStateButton.cpp ├── ThreeStateButton.h ├── ToolTip.cpp ├── ToolTip.h ├── TreeView.cpp └── TreeView.h ├── images ├── acrylic │ └── noise.png ├── check_box │ ├── Accept_black.svg │ ├── Accept_white.svg │ ├── PartialAccept_black.svg │ └── PartialAccept_white.svg ├── color_dialog │ ├── Clear_black.svg │ ├── Clear_white.svg │ └── HuePanel.png ├── folder_list_dialog │ ├── Add_black.png │ ├── Add_white.png │ ├── Close_black.png │ └── Close_white.png ├── icons │ ├── Accept_black.svg │ ├── Accept_white.svg │ ├── Add_black.svg │ ├── Add_white.svg │ ├── Album_black.svg │ ├── Album_white.svg │ ├── Alignment_black.svg │ ├── Alignment_white.svg │ ├── BackgroundColor_black.svg │ ├── BackgroundColor_white.svg │ ├── BookShelf_black.svg │ ├── BookShelf_white.svg │ ├── Brush_black.svg │ ├── Brush_white.svg │ ├── Camera_black.svg │ ├── Camera_white.svg │ ├── Cancel_black.svg │ ├── Cancel_white.svg │ ├── Chat_black.svg │ ├── Chat_white.svg │ ├── CheckBox_black.svg │ ├── CheckBox_white.svg │ ├── ChevronDown_black.svg │ ├── ChevronDown_white.svg │ ├── ChevronRight_black.svg │ ├── ChevronRight_white.svg │ ├── Close_black.svg │ ├── Close_white.svg │ ├── Code_black.svg │ ├── Code_white.svg │ ├── Completed_black.svg │ ├── Completed_white.svg │ ├── Constract_black.svg │ ├── Constract_white.svg │ ├── Copy_black.svg │ ├── Copy_white.svg │ ├── Cut_black.svg │ ├── Cut_white.svg │ ├── DateTime_black.svg │ ├── DateTime_white.svg │ ├── Delete_black.svg │ ├── Delete_white.svg │ ├── Document_black.svg │ ├── Document_white.svg │ ├── Download_black.svg │ ├── Download_white.svg │ ├── Edit_black.svg │ ├── Edit_white.svg │ ├── Embed_black.svg │ ├── Embed_white.svg │ ├── Feedback_black.svg │ ├── Feedback_white.svg │ ├── FolderAdd_black.svg │ ├── FolderAdd_white.svg │ ├── Folder_black.svg │ ├── Folder_white.svg │ ├── Font_black.svg │ ├── Font_white.svg │ ├── GitHub_black.svg │ ├── GitHub_white.svg │ ├── Globe_black.svg │ ├── Globe_white.svg │ ├── Heart_black.svg │ ├── Heart_white.svg │ ├── Help_black.svg │ ├── Help_white.svg │ ├── Hide_black.svg │ ├── Hide_white.svg │ ├── Highlight_black.svg │ ├── Highlight_white.svg │ ├── History_black.svg │ ├── History_white.svg │ ├── Home_black.svg │ ├── Home_white.svg │ ├── Info_black.svg │ ├── Info_white.svg │ ├── Language_black.svg │ ├── Language_white.svg │ ├── Layout_black.svg │ ├── Layout_white.svg │ ├── Link_black.svg │ ├── Link_white.svg │ ├── Mail_black.svg │ ├── Mail_white.svg │ ├── Media_black.svg │ ├── Media_white.svg │ ├── Menu_black copy.svg │ ├── Menu_black.svg │ ├── Menu_white copy.svg │ ├── Menu_white.svg │ ├── Message_black.svg │ ├── Message_white.svg │ ├── Microphone_black.svg │ ├── Microphone_white.svg │ ├── Minimize_black.svg │ ├── Minimize_white.svg │ ├── More_black.svg │ ├── More_white.svg │ ├── Movie_black.svg │ ├── Movie_white.svg │ ├── MusicFolder_black.svg │ ├── MusicFolder_white.svg │ ├── Music_black.svg │ ├── Music_white.svg │ ├── Palette_black.svg │ ├── Palette_white.svg │ ├── Paste_black.svg │ ├── Paste_white.svg │ ├── PencilInk_black.svg │ ├── PencilInk_white.svg │ ├── Phone_black.svg │ ├── Phone_white.svg │ ├── Photo_black.svg │ ├── Photo_white.svg │ ├── Pin_black.svg │ ├── Pin_white.svg │ ├── Print_black.svg │ ├── Print_white.svg │ ├── Question_black.svg │ ├── Question_white.svg │ ├── Return_black.svg │ ├── Return_white.svg │ ├── Ringer_black.svg │ ├── Ringer_white.svg │ ├── SaveAs_black.svg │ ├── SaveAs_white.svg │ ├── Save_black.svg │ ├── Save_white.svg │ ├── Scroll_black.svg │ ├── Scroll_white.svg │ ├── Search_black.svg │ ├── Search_white.svg │ ├── SendFill_black.svg │ ├── SendFill_white.svg │ ├── Send_black.svg │ ├── Send_white.svg │ ├── Setting_black.svg │ ├── Setting_white.svg │ ├── Share_black.svg │ ├── Share_white.svg │ ├── Sync_black.svg │ ├── Sync_white.svg │ ├── Tag_black.svg │ ├── Tag_white.svg │ ├── Transparent_black.svg │ ├── Transparent_white.svg │ ├── Unpin_black.svg │ ├── Unpin_white.svg │ ├── Update_black.svg │ ├── Update_white.svg │ ├── Video_black.svg │ ├── Video_white.svg │ ├── View_black.svg │ ├── View_white.svg │ ├── ZipFolder_black.svg │ ├── ZipFolder_white.svg │ ├── ZoomIn_black.svg │ ├── ZoomIn_white.svg │ ├── ZoomOut_black.svg │ ├── ZoomOut_white.svg │ ├── Zoom_black.svg │ └── Zoom_white.svg ├── info_bar │ ├── Error_dark.svg │ ├── Error_light.svg │ ├── Info_dark.svg │ ├── Info_light.svg │ ├── Success_dark.svg │ ├── Success_light.svg │ ├── Warning_dark.svg │ └── Warning_light.svg ├── spin_box │ ├── Down_black.svg │ ├── Down_white.svg │ ├── Up_black.svg │ └── Up_white.svg ├── time_picker │ ├── Down_black.svg │ ├── Down_white.svg │ ├── Up_black.svg │ └── Up_white.svg └── tree_view │ ├── TreeViewClose_black.svg │ ├── TreeViewClose_white.svg │ ├── TreeViewOpen_black.svg │ └── TreeViewOpen_white.svg ├── qfluentwidgets.qrc └── qss ├── dark ├── button.qss ├── check_box.qss ├── color_dialog.qss ├── combo_box.qss ├── dialog.qss ├── expand_setting_card.qss ├── folder_list_dialog.qss ├── info_bar.qss ├── line_edit.qss ├── menu.qss ├── message_dialog.qss ├── navigation_interface.qss ├── setting_card.qss ├── setting_card_group.qss ├── slider.qss ├── spin_box.qss ├── state_tool_tip.qss ├── switch_button.qss ├── time_picker.qss ├── tool_tip.qss └── tree_view.qss └── light ├── button.qss ├── check_box.qss ├── color_dialog.qss ├── combo_box.qss ├── dialog.qss ├── expand_setting_card.qss ├── folder_list_dialog.qss ├── info_bar.qss ├── line_edit.qss ├── menu.qss ├── message_dialog.qss ├── navigation_interface.qss ├── setting_card.qss ├── setting_card_group.qss ├── slider.qss ├── spin_box.qss ├── state_tool_tip.qss ├── switch_button.qss ├── time_picker.qss ├── tool_tip.qss └── tree_view.qss /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "3rdparty/framelesshelper"] 2 | path = 3rdparty/framelesshelper 3 | url = https://github.com/programClown/framelesshelper.git 4 | [submodule "qmsetup"] 5 | path = qmsetup 6 | url = https://github.com/stdware/qmsetup.git 7 | -------------------------------------------------------------------------------- /QFluentWidgets.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | 3 | SUBDIRS += \ 4 | QFluentWidgets \ 5 | QFramelessWindow \ 6 | example 7 | -------------------------------------------------------------------------------- /QFramelessWindow/QFramelessWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "QFramelessWindow.h" 2 | #include "titlebar/TitleBarButton.h" 3 | 4 | #if defined(Q_OS_WIN32) 5 | 6 | /** 7 | * @brief 无边框窗口 8 | * @param parent 9 | */ 10 | FramelessMainWindow::FramelessMainWindow(QWidget *parent) : WindowsFramelessWindow(parent) { } 11 | 12 | /** 13 | * @brief 无边框对话框 14 | * @param parent 15 | */ 16 | FramelessDialog::FramelessDialog(QWidget *parent) : WindowsFramelessDialog(parent) 17 | { 18 | TitleBar *titleBar = getTitleBar(); 19 | titleBar->minimizeButton()->hide(); 20 | titleBar->setDoubleClickEnabled(true); 21 | } 22 | 23 | #elif defined(Q_OS_OSX) 24 | 25 | #else 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /QFramelessWindow/QFramelessWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef QFRAMELESSWINDOW_H 2 | #define QFRAMELESSWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "titlebar/TitleBar.h" 8 | 9 | #if defined(Q_OS_WIN32) 10 | #include "windows/WindowsFramelessHelper.h" 11 | using QFramelessHelper = WindowsFramelessHelper; 12 | 13 | #else 14 | #include "widgetResizeHandler/WidgetResizeHandler.h" 15 | using QFramelessHelper = WidgetResizeHandler; 16 | #endif 17 | 18 | #endif // QFRAMELESSWINDOW_H 19 | -------------------------------------------------------------------------------- /QFramelessWindow/images/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /QFramelessWindow/qframelesswindow.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/close.svg 4 | 5 | 6 | -------------------------------------------------------------------------------- /QFramelessWindow/windows/WindowsFramelessDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef WINDOWSFRAMELESSDIALOG_H 2 | #define WINDOWSFRAMELESSDIALOG_H 3 | 4 | #include 5 | 6 | class WindowsWindowEffect; 7 | class TitleBar; 8 | 9 | class WindowsFramelessDialog : public QDialog 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit WindowsFramelessDialog(QWidget *parent = nullptr); 14 | 15 | void setTitleBar(TitleBar *tBar); 16 | void setResizeEnabled(bool isEnabled); 17 | bool getResizeEnabled() const; 18 | WindowsWindowEffect *getWindowEffect() const; 19 | TitleBar *getTitleBar() const; 20 | 21 | protected: 22 | virtual QString effectType() const { return ""; }; 23 | 24 | private: 25 | WindowsWindowEffect *windowEffect; 26 | TitleBar *titleBar; 27 | bool isResizeEnabled; 28 | 29 | private slots: 30 | void onScreenChanged(QScreen *screen); 31 | 32 | signals: 33 | 34 | // QWidget interface 35 | protected: 36 | void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; 37 | bool nativeEvent(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE; 38 | }; 39 | 40 | #endif // WINDOWSFRAMELESSDIALOG_H 41 | -------------------------------------------------------------------------------- /QFramelessWindow/windows/WindowsFramelessWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef WINDOWSFRAMELESSWIDGET_H 2 | #define WINDOWSFRAMELESSWIDGET_H 3 | #include 4 | 5 | class WindowsWindowEffect; 6 | class TitleBar; 7 | 8 | class WindowsFramelessWidget : public QWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit WindowsFramelessWidget(QWidget *parent = nullptr); 13 | 14 | void setTitleBar(TitleBar *tBar); 15 | void setResizeEnabled(bool isEnabled); 16 | bool getResizeEnabled() const; 17 | WindowsWindowEffect *getWindowEffect() const; 18 | TitleBar *getTitleBar() const; 19 | 20 | protected: 21 | virtual QString effectType() const { return ""; }; 22 | 23 | private: 24 | WindowsWindowEffect *windowEffect; 25 | TitleBar *titleBar; 26 | bool isResizeEnabled; 27 | 28 | private slots: 29 | void onScreenChanged(QScreen *screen); 30 | 31 | signals: 32 | 33 | // QWidget interface 34 | protected: 35 | void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; 36 | bool nativeEvent(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE; 37 | }; 38 | 39 | #endif // WINDOWSFRAMELESSWIDGET_H 40 | -------------------------------------------------------------------------------- /QFramelessWindow/windows/WindowsWindowEffect.h: -------------------------------------------------------------------------------- 1 | #ifndef WINDOWSWINDOWEFFECT_H 2 | #define WINDOWSWINDOWEFFECT_H 3 | 4 | #include "WindowCompositionAttribute.h" 5 | 6 | #include 7 | 8 | struct ACCENT_POLICY; 9 | struct WINDOWCOMPOSITIONATTRIBDATA; 10 | 11 | class WindowsWindowEffect : public QWidget 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | WindowsWindowEffect(QWidget *parent); 17 | 18 | bool setAcrylicEffect(HWND hWnd, std::string gradientColor = "F2F2F299", bool enableShadow = true, 19 | uint32_t animationId = 0); 20 | bool setMicaEffect(HWND hWnd, bool isDarkMode = true); 21 | bool setAeroEffect(HWND hWnd); 22 | bool removeBackgroundEffect(HWND hWnd); 23 | 24 | static void moveWindow(HWND hWnd); 25 | 26 | bool addShadowEffect(HWND hWnd); 27 | bool addMenuShadowEffect(HWND hWnd); 28 | bool removeShadowEffect(HWND hWnd); 29 | 30 | static void removeMenuShadowEffect(HWND hWnd); 31 | static void addWindowAnimation(HWND hWnd); 32 | 33 | private: 34 | ACCENT_POLICY accentPolicy; 35 | WINDOWCOMPOSITIONATTRIBDATA winCompAttrData; 36 | }; 37 | 38 | #endif // WINDOWSWINDOWEFFECT_H 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # QFluentWidgets 2 | 3 | Implementation of the Fluent UI component library, but for Qt C++ 4 | 5 | - [*What Fluent UI?*](https://developer.microsoft.com/en-us/fluentui) 6 | 7 | > [!CAUTION] 8 | > Active work on rewriting the code, so please be careful when using this library! 9 | 10 | 11 | ## General 12 | Based on the repository [programClown/QFluentWidgets](https://github.com/programClown/QFluentWidgets) under the GPLv3 license. 13 | Current: `444f2fe980ac472449be20fe24a185d251942dc3` 14 | 15 | ## Install 16 | 17 | Soon... 18 | 19 | ## FAQ 20 | ### Can I add PR to this repository? 21 | - Of course, if you want to implement some new component that doesn't exist or suggest a fix! 22 | 23 | ### Which versions of Qt does it support? 24 | - I am focused on supporting the latest version of Qt 5.15 and subsequent versions of Qt6 25 | 26 | > [!WARNING] 27 | > Earlier versions or beta versions are not supported! Qt5 support will be limited. 28 | -------------------------------------------------------------------------------- /examples/AcrylicLabelDemo/AcrylicLabelDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/AcrylicLabelDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | Q_INIT_RESOURCE(qfluentwidgets); 8 | 9 | QApplication a(argc, argv); 10 | AcrylicLabel w(20, QColor(105, 114, 168, 102)); 11 | w.setImage("D:\\vscode\\PyQt-Fluent-Widgets\\examples\\acrylic_label\\resource\\埃罗芒阿老师.jpg"); 12 | w.show(); 13 | return a.exec(); 14 | } 15 | -------------------------------------------------------------------------------- /examples/ButtonDemo/ButtonDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/CheckBoxDemo/CheckBoxDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/CheckBoxDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | class Demo : public QWidget 5 | { 6 | Q_OBJECT 7 | public: 8 | Demo(QWidget *parent = nullptr) : QWidget(parent) 9 | { 10 | CheckBox *checkBox = new CheckBox("This is a check box", this); 11 | checkBox->setTristate(true); 12 | checkBox->move(120, 80); 13 | setStyleSheet("Demo{background:white}"); 14 | resize(400, 400); 15 | } 16 | }; 17 | 18 | int main(int argc, char *argv[]) 19 | { 20 | // enable dpi scale 21 | // QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); 22 | 23 | QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 24 | QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); 25 | 26 | Q_INIT_RESOURCE(qfluentwidgets); 27 | 28 | QApplication a(argc, argv); 29 | Demo w; 30 | w.show(); 31 | return a.exec(); 32 | } 33 | 34 | #include "main.moc" 35 | -------------------------------------------------------------------------------- /examples/ColorDialogDemo/ColorDialogDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/ComboBoxDemo/ComboBoxDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | 21 | RESOURCES += \ 22 | res.qrc 23 | -------------------------------------------------------------------------------- /examples/ComboBoxDemo/res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | res/style.qss 4 | res/arrow_down.png 5 | res/arrow_up.png 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/ComboBoxDemo/res/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/ComboBoxDemo/res/arrow_down.png -------------------------------------------------------------------------------- /examples/ComboBoxDemo/res/arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/ComboBoxDemo/res/arrow_up.png -------------------------------------------------------------------------------- /examples/DialogDemo/DialogDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/DialogDemo/MainWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | 3 | MainWindow::MainWindow(QWidget *parent) 4 | : QMainWindow(parent) 5 | { 6 | } 7 | 8 | MainWindow::~MainWindow() 9 | { 10 | } 11 | 12 | -------------------------------------------------------------------------------- /examples/DialogDemo/MainWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | class MainWindow : public QMainWindow 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | MainWindow(QWidget *parent = nullptr); 12 | ~MainWindow(); 13 | }; 14 | #endif // MAINWINDOW_H 15 | -------------------------------------------------------------------------------- /examples/FlowLayoutDemo/FlowLayoutDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/FlowLayoutDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | class Demo : public QWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | Demo(QWidget *parent = nullptr) : QWidget(parent) 12 | { 13 | 14 | FlowLayout *layout = new FlowLayout(this, true, false); 15 | 16 | layout->setAnimation(250, QEasingCurve::OutQuad); 17 | 18 | layout->setContentsMargins(30, 30, 30, 30); 19 | layout->setVerticalSpacing(20); 20 | layout->setHorizontalSpacing(10); 21 | 22 | layout->addWidget(new QPushButton("aiko")); 23 | layout->addWidget(new QPushButton("刘静爱")); 24 | layout->addWidget(new QPushButton("柳井爱子")); 25 | layout->addWidget(new QPushButton("aiko 赛高")); 26 | layout->addWidget(new QPushButton("aiko 太爱啦")); 27 | resize(250, 300); 28 | setStyleSheet("Demo{background: white} QPushButton{padding: 5px 10px; font:15px \"Microsoft YaHei\"}"); 29 | } 30 | }; 31 | 32 | int main(int argc, char *argv[]) 33 | { 34 | QApplication a(argc, argv); 35 | Demo w; 36 | w.show(); 37 | return a.exec(); 38 | } 39 | 40 | #include "main.moc" 41 | -------------------------------------------------------------------------------- /examples/FolderListDialogDemo/FolderListDialogDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/InfoBarDemo/InfoBarDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/LineEditDemo/LineEditDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/LineEditDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | class Demo : public QWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | Demo(QWidget *parent = nullptr) : QWidget(parent) 12 | { 13 | auto lineEdit = new LineEdit(this); 14 | auto button = new PushButton("按钮", this); 15 | auto textEdit = new TextEdit(this); 16 | 17 | resize(500, 500); 18 | textEdit->move(110, 200); 19 | lineEdit->move(110, 50); 20 | button->move(320, 50); 21 | 22 | lineEdit->resize(200, 33); 23 | lineEdit->setClearButtonEnabled(true); 24 | } 25 | }; 26 | 27 | int main(int argc, char *argv[]) 28 | { 29 | // enable dpi scale 30 | #if (QT_VERSION > QT_VERSION_CHECK(5, 14, 0)) 31 | QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); 32 | #endif 33 | QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 34 | QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); 35 | 36 | Q_INIT_RESOURCE(qfluentwidgets); 37 | 38 | QApplication a(argc, argv); 39 | Demo w; 40 | w.show(); 41 | return a.exec(); 42 | } 43 | 44 | #include "main.moc" 45 | -------------------------------------------------------------------------------- /examples/MessageDialogDemo/MessageDialogDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/NavigationDemo/NavigationDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | 21 | RESOURCES += \ 22 | res.qrc 23 | -------------------------------------------------------------------------------- /examples/NavigationDemo/res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resource/dark/demo.qss 4 | resource/light/demo.qss 5 | resource/logo.png 6 | resource/shoko.png 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/NavigationDemo/resource/dark/demo.qss: -------------------------------------------------------------------------------- 1 | Widget > QLabel { 2 | font: 24px 'Segoe UI', 'Microsoft YaHei'; 3 | } 4 | 5 | Widget { 6 | border: 1px solid rgb(29, 29, 29); 7 | border-right: none; 8 | border-bottom: none; 9 | border-top-left-radius: 10px; 10 | background-color: rgb(39, 39, 39); 11 | } 12 | 13 | Window { 14 | background-color: rgb(32, 32, 32); 15 | } 16 | 17 | StandardTitleBar { 18 | background-color: rgb(32, 32, 32); 19 | } 20 | 21 | StandardTitleBar > QLabel, 22 | Widget > QLabel { 23 | color: white; 24 | } 25 | 26 | 27 | MinimizeButton { 28 | qproperty-normalColor: white; 29 | qproperty-normalBackgroundColor: transparent; 30 | qproperty-hoverColor: white; 31 | qproperty-hoverBackgroundColor: rgba(255, 255, 255, 26); 32 | qproperty-pressedColor: white; 33 | qproperty-pressedBackgroundColor: rgba(255, 255, 255, 51) 34 | } 35 | 36 | 37 | MaximizeButton { 38 | qproperty-normalColor: white; 39 | qproperty-normalBackgroundColor: transparent; 40 | qproperty-hoverColor: white; 41 | qproperty-hoverBackgroundColor: rgba(255, 255, 255, 26); 42 | qproperty-pressedColor: white; 43 | qproperty-pressedBackgroundColor: rgba(255, 255, 255, 51) 44 | } 45 | 46 | CloseButton { 47 | qproperty-normalColor: white; 48 | qproperty-normalBackgroundColor: transparent; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /examples/NavigationDemo/resource/light/demo.qss: -------------------------------------------------------------------------------- 1 | Widget > QLabel { 2 | font: 24px 'Segoe UI', 'Microsoft YaHei'; 3 | } 4 | 5 | Widget { 6 | border: 1px solid rgb(229, 229, 229); 7 | border-right: none; 8 | border-bottom: none; 9 | border-top-left-radius: 10px; 10 | background-color: rgb(249, 249, 249); 11 | } 12 | 13 | Window { 14 | background-color: rgb(243, 243, 243); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /examples/NavigationDemo/resource/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/NavigationDemo/resource/logo.png -------------------------------------------------------------------------------- /examples/NavigationDemo/resource/shoko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/NavigationDemo/resource/shoko.png -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/AWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "AWindow.h" 2 | 3 | #include "TitleBar.h" 4 | #include "WindowsWindowEffect.h" 5 | 6 | #include 7 | #include 8 | 9 | AWindow::AWindow(QWidget *parent) : AcrylicWindow(parent) 10 | { 11 | // 窗口效果 12 | getWindowEffect()->setAcrylicEffect((HWND)winId()); 13 | setStyleSheet("background:rgba(232, 232, 232, 150)"); 14 | 15 | // 标题栏 16 | StandardTitleBar *ttb = new StandardTitleBar(this); 17 | setTitleBar(ttb); 18 | 19 | QIcon icon = QIcon(":/images/logo.png"); 20 | ttb->setIcon(icon); 21 | setWindowIcon(icon); 22 | setWindowTitle("PyQt-Frameless-Window"); 23 | } 24 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/AWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef AWINDOW_H 2 | #define AWINDOW_H 3 | 4 | #include "WindowsFramelessWindow.h" 5 | 6 | class AWindow : public AcrylicWindow 7 | { 8 | public: 9 | AWindow(QWidget *parent = nullptr); 10 | }; 11 | 12 | #endif // AWINDOW_H 13 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/DWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef DWINDOW_H 2 | #define DWINDOW_H 3 | 4 | #include 5 | #include 6 | 7 | class CustomTitleBar : public StandardTitleBar 8 | { 9 | public: 10 | CustomTitleBar(QWidget *parent = nullptr); 11 | }; 12 | 13 | class DWindow : public WindowsFramelessWindow 14 | { 15 | public: 16 | DWindow(QWidget *parent = nullptr); 17 | 18 | void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; 19 | 20 | private: 21 | QLabel *m_label; 22 | }; 23 | 24 | #endif // DWINDOW_H 25 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/FWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef FWINDOW_H 2 | #define FWINDOW_H 3 | 4 | #include "QFramelessWindow.h" 5 | 6 | #include 7 | 8 | class FWindow : public WindowsFramelessWindow 9 | { 10 | public: 11 | FWindow(QWidget *parent = nullptr); 12 | }; 13 | 14 | #endif // FWINDOW_H 15 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/MainWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | #include "ui_MainWindow.h" 3 | 4 | #include 5 | 6 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) 7 | { 8 | ui->setupUi(this); 9 | setWindowTitle("BOGG"); 10 | } 11 | 12 | MainWindow::~MainWindow() 13 | { 14 | delete ui; 15 | } 16 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/MainWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | namespace Ui { class MainWindow; } 8 | QT_END_NAMESPACE 9 | 10 | class MainWindow : public QMainWindow 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | MainWindow(QWidget *parent = nullptr); 16 | ~MainWindow(); 17 | 18 | private: 19 | Ui::MainWindow *ui; 20 | }; 21 | #endif // MAINWINDOW_H 22 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/MainWindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/QFramelessWindowDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | win32: { 3 | QT += winextras 4 | } 5 | 6 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 7 | 8 | CONFIG += c++17 9 | 10 | include($$PWD/../baseconfig.pri) 11 | 12 | INCLUDEPATH += $$PWD/../../QFramelessWindow 13 | INCLUDEPATH += $$PWD/../../QFramelessWindow/windows 14 | INCLUDEPATH += $$PWD/../../QFramelessWindow/titlebar 15 | 16 | CONFIG(debug, release|debug){ 17 | win32:LIBS += -lqframelesswindowd -luser32 -lDwmapi 18 | else: LIBS += -lqframelesswindow -luser32 -lDwmapi 19 | } else { 20 | LIBS += -lqframelesswindow 21 | } 22 | 23 | # You can make your code fail to compile if it uses deprecated APIs. 24 | # In order to do so, uncomment the following line. 25 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 26 | 27 | 28 | 29 | SOURCES += \ 30 | # AWindow.cpp \ 31 | # DWindow.cpp \ 32 | # FWindow.cpp \ 33 | main.cpp \ 34 | MainWindow.cpp 35 | 36 | HEADERS += \ 37 | # AWindow.h \ 38 | # DWindow.h \ 39 | # FWindow.h \ 40 | MainWindow.h 41 | 42 | FORMS += \ 43 | MainWindow.ui 44 | 45 | 46 | # Default rules for deployment. 47 | qnx: target.path = /tmp/$${TARGET}/bin 48 | else: unix:!android: target.path = /opt/$${TARGET}/bin 49 | !isEmpty(target.path): INSTALLS += target 50 | 51 | RESOURCES += \ 52 | images.qrc 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/images.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/shoko.png 4 | images/logo.png 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/images/acrylic_window.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/QFramelessWindowDemo/images/acrylic_window.jpg -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/images/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/QFramelessWindowDemo/images/cover.jpg -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/QFramelessWindowDemo/images/logo.png -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/images/normal_frameless_window.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/QFramelessWindowDemo/images/normal_frameless_window.gif -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/images/shoko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/QFramelessWindowDemo/images/shoko.png -------------------------------------------------------------------------------- /examples/QFramelessWindowDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | QApplication a(argc, argv); 11 | MainWindow w; 12 | // FWindow wf; // 标题栏包含菜单、应用图标和标题居中, 13 | // DWindow wd; // 应用图标和标题 14 | // AWindow wa; // 毛玻璃和阴影效果 15 | 16 | QFramelessHelper *helper = new QFramelessHelper(&w); 17 | helper->setResizeEnabled(false); 18 | 19 | w.show(); 20 | 21 | return a.exec(); 22 | } 23 | -------------------------------------------------------------------------------- /examples/RadioButtonDemo/RadioButtonDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/RadioButtonDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | class Demo : public QWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | Demo(QWidget *parent = nullptr) : QWidget(parent) 12 | { 13 | auto vBoxLayout = new QVBoxLayout(this); 14 | auto button1 = new RadioButton("Option 1", this); 15 | auto button2 = new RadioButton("Option 2", this); 16 | auto button3 = new RadioButton("Option 3", this); 17 | 18 | vBoxLayout->addWidget(button1, 0, Qt::AlignCenter); 19 | vBoxLayout->addWidget(button2, 0, Qt::AlignCenter); 20 | vBoxLayout->addWidget(button3, 0, Qt::AlignCenter); 21 | resize(300, 150); 22 | setStyleSheet("Demo{background:white}"); 23 | } 24 | }; 25 | 26 | int main(int argc, char *argv[]) 27 | { 28 | // enable dpi scale 29 | #if (QT_VERSION > QT_VERSION_CHECK(5, 14, 0)) 30 | QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); 31 | #endif 32 | QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 33 | QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); 34 | 35 | Q_INIT_RESOURCE(qfluentwidgets); 36 | 37 | QApplication a(argc, argv); 38 | Demo w; 39 | w.show(); 40 | return a.exec(); 41 | } 42 | 43 | #include "main.moc" 44 | -------------------------------------------------------------------------------- /examples/ScrollAreaDemo/Dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "Dialog.h" 2 | #include "ui_Dialog.h" 3 | 4 | #include 5 | 6 | Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) 7 | { 8 | ui->setupUi(this); 9 | 10 | auto label = new PixmapLabel(this); 11 | label->setPixmap(QPixmap(":/resource/shoko.jpg")); 12 | ui->scrollArea->setWidget(label); 13 | } 14 | 15 | Dialog::~Dialog() 16 | { 17 | delete ui; 18 | } 19 | -------------------------------------------------------------------------------- /examples/ScrollAreaDemo/Dialog.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOG_H 2 | #define DIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class Dialog; 8 | } 9 | 10 | class Dialog : public QDialog 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit Dialog(QWidget *parent = nullptr); 16 | ~Dialog(); 17 | 18 | private: 19 | Ui::Dialog *ui; 20 | }; 21 | 22 | #endif // DIALOG_H 23 | -------------------------------------------------------------------------------- /examples/ScrollAreaDemo/ScrollAreaDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | Dialog.cpp \ 15 | main.cpp 16 | 17 | # Default rules for deployment. 18 | qnx: target.path = /tmp/$${TARGET}/bin 19 | else: unix:!android: target.path = /opt/$${TARGET}/bin 20 | !isEmpty(target.path): INSTALLS += target 21 | 22 | RESOURCES += \ 23 | res.qrc 24 | 25 | FORMS += \ 26 | Dialog.ui 27 | 28 | HEADERS += \ 29 | Dialog.h 30 | -------------------------------------------------------------------------------- /examples/ScrollAreaDemo/res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | resource/demo.qss 4 | resource/shoko.jpg 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/ScrollAreaDemo/resource/demo.qss: -------------------------------------------------------------------------------- 1 | QScrollBar:vertical { 2 | background: transparent; 3 | width: 5px; 4 | padding-right: 2px; 5 | } 6 | 7 | QScrollBar:horizontal { 8 | background: transparent; 9 | height: 5px; 10 | padding-bottom: 2px; 11 | } 12 | 13 | /*隐藏上箭头*/ 14 | QScrollBar::sub-line { 15 | background: transparent; 16 | } 17 | 18 | /*隐藏下箭头*/ 19 | QScrollBar::add-line { 20 | background: transparent; 21 | } 22 | 23 | QScrollBar::handle { 24 | background: rgb(122, 122, 122); 25 | border: 2px solid rgb(128, 128, 128); 26 | border-radius: 1px; 27 | } 28 | 29 | QScrollBar::handle:vertical { 30 | min-height: 40px; 31 | } 32 | 33 | QScrollBar::handle:horizontal { 34 | min-width: 40px; 35 | } 36 | 37 | QScrollBar::add-page, 38 | QScrollBar::sub-page { 39 | background: none; 40 | } 41 | -------------------------------------------------------------------------------- /examples/ScrollAreaDemo/resource/shoko.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/ScrollAreaDemo/resource/shoko.jpg -------------------------------------------------------------------------------- /examples/SliderDemo/MainWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | 3 | MainWindow::MainWindow(QWidget *parent) 4 | : QMainWindow(parent) 5 | { 6 | } 7 | 8 | MainWindow::~MainWindow() 9 | { 10 | } 11 | 12 | -------------------------------------------------------------------------------- /examples/SliderDemo/MainWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | class MainWindow : public QMainWindow 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | MainWindow(QWidget *parent = nullptr); 12 | ~MainWindow(); 13 | }; 14 | #endif // MAINWINDOW_H 15 | -------------------------------------------------------------------------------- /examples/SliderDemo/SliderDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/SpinBoxDemo/SpinBoxDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/StateToolTipDemo/StateToolTipDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/SwitchButtonDemo/SwitchButtonDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/SwitchButtonDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | class Demo : public QWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | Demo(QWidget *parent = nullptr) : QWidget(parent) 12 | { 13 | resize(160, 80); 14 | 15 | m_switchButton = new SwitchButton("Off", this); 16 | m_switchButton->move(48, 24); 17 | connect(m_switchButton, &SwitchButton::checkedChanged, this, &Demo::onCheckedChanged); 18 | } 19 | 20 | private slots: 21 | void onCheckedChanged(bool checked) 22 | { 23 | QString text = checked ? "On" : "Off"; 24 | m_switchButton->setText(text); 25 | } 26 | 27 | private: 28 | SwitchButton *m_switchButton; 29 | }; 30 | 31 | int main(int argc, char *argv[]) 32 | { 33 | // enable dpi scale 34 | #if (QT_VERSION > QT_VERSION_CHECK(5, 14, 0)) 35 | QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); 36 | #endif 37 | QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 38 | QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); 39 | 40 | Q_INIT_RESOURCE(qfluentwidgets); 41 | 42 | QApplication a(argc, argv); 43 | Demo w; 44 | w.show(); 45 | return a.exec(); 46 | } 47 | 48 | #include "main.moc" 49 | -------------------------------------------------------------------------------- /examples/TimePickerDemo/TimePickerDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/ToolTipDemo/ToolTipDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/TreeViewDemo/TreeViewDemo.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | main.cpp 15 | 16 | # Default rules for deployment. 17 | qnx: target.path = /tmp/$${TARGET}/bin 18 | else: unix:!android: target.path = /opt/$${TARGET}/bin 19 | !isEmpty(target.path): INSTALLS += target 20 | -------------------------------------------------------------------------------- /examples/TreeViewDemo/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | class Demo : public QWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | Demo(QWidget *parent = nullptr) : QWidget(parent) 13 | { 14 | auto hBoxLayout = new QHBoxLayout(this); 15 | setStyleSheet("Demo{background:rgb(255,255,255)}"); 16 | 17 | auto view = new TreeView(this); 18 | auto model = new QFileSystemModel(); 19 | model->setRootPath("."); 20 | view->setModel(model); 21 | 22 | hBoxLayout->addWidget(view); 23 | hBoxLayout->setContentsMargins(30, 30, 30, 30); 24 | resize(700, 600); 25 | } 26 | }; 27 | 28 | int main(int argc, char *argv[]) 29 | { 30 | // enable dpi scale 31 | #if (QT_VERSION > QT_VERSION_CHECK(5, 14, 0)) 32 | QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); 33 | #endif 34 | QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 35 | QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); 36 | 37 | Q_INIT_RESOURCE(qfluentwidgets); 38 | 39 | QApplication a(argc, argv); 40 | Demo w; 41 | w.show(); 42 | return a.exec(); 43 | } 44 | 45 | #include "main.moc" 46 | -------------------------------------------------------------------------------- /examples/baseconfig.pri: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | # Compiler options 3 | #------------------------------------------------------------------------------- 4 | QT += widgets core gui xml svg 5 | 6 | *g++*: { 7 | QMAKE_CXXFLAGS_RELEASE -= -O 8 | QMAKE_CXXFLAGS_RELEASE *= -O3 9 | } 10 | 11 | *msvc*: { 12 | QMAKE_CFLAGS += /utf-8 13 | QMAKE_CXXFLAGS += /utf-8 14 | QMAKE_CXXFLAGS_RELEASE -= /O 15 | QMAKE_CXXFLAGS_RELEASE *= /O2 16 | } 17 | 18 | contains(CONFIG, framelesshelper) { 19 | include($$PWD/share.pri) 20 | include($$PWD/../3rdparty/framelesshelper/qmake/core.pri) 21 | include($$PWD/../3rdparty/framelesshelper/qmake/widgets.pri) 22 | } 23 | 24 | INCLUDEPATH += $$PWD/../QFluentWidgets 25 | 26 | CONFIG(debug, release|debug){ 27 | win32:LIBS += -lqfluentwidgetsd 28 | else: LIBS += -lqfluentwidgets 29 | } else { 30 | LIBS += -lqfluentwidgets 31 | } 32 | 33 | #------------------------------------------------------------------------------- 34 | # Build options 35 | #------------------------------------------------------------------------------- 36 | DESTDIR = $$PWD/../bin #指定生成的应用程序放置的路径 37 | LIBS += -L$$PWD/../bin #指定生成的库文件放置的路径,与应用程序放在一起 38 | -------------------------------------------------------------------------------- /examples/example.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | 3 | SUBDIRS += \ 4 | AcrylicLabelDemo \ 5 | ButtonDemo \ 6 | CheckBoxDemo \ 7 | ColorDialogDemo \ 8 | ComboBoxDemo \ 9 | DialogDemo \ 10 | FlowLayoutDemo \ 11 | FolderListDialogDemo \ 12 | InfoBarDemo \ 13 | LineEditDemo \ 14 | MessageDialogDemo \ 15 | NavigationDemo \ 16 | QFramelessWindowDemo\ 17 | RadioButtonDemo \ 18 | ScrollAreaDemo \ 19 | SliderDemo \ 20 | SpinBoxDemo \ 21 | StateToolTipDemo \ 22 | SwitchButtonDemo \ 23 | TimePickerDemo \ 24 | ToolTipDemo \ 25 | TreeViewDemo \ 26 | framelesswindow \ 27 | gallery \ 28 | openglwidget 29 | -------------------------------------------------------------------------------- /examples/framelesswindow/AcrylicDemo.cpp: -------------------------------------------------------------------------------- 1 | #include "AcrylicDemo.h" 2 | -------------------------------------------------------------------------------- /examples/framelesswindow/AcrylicDemo.h: -------------------------------------------------------------------------------- 1 | #ifndef ACRYLICDEMO_H 2 | #define ACRYLICDEMO_H 3 | 4 | #endif // ACRYLICDEMO_H 5 | -------------------------------------------------------------------------------- /examples/framelesswindow/CustomWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "CustomWidget.h" 2 | -------------------------------------------------------------------------------- /examples/framelesswindow/CustomWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef CUSTOMWIDGET_H 2 | #define CUSTOMWIDGET_H 3 | 4 | #endif // CUSTOMWIDGET_H 5 | -------------------------------------------------------------------------------- /examples/framelesswindow/MainWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | FRAMELESSHELPER_BEGIN_NAMESPACE 7 | class StandardTitleBar; 8 | FRAMELESSHELPER_END_NAMESPACE 9 | 10 | namespace Ui 11 | { 12 | class MainWindow; 13 | } 14 | 15 | class MainWindow : public FRAMELESSHELPER_PREPEND_NAMESPACE(FramelessMainWindow) 16 | { 17 | Q_OBJECT 18 | Q_DISABLE_COPY_MOVE(MainWindow) 19 | 20 | public: 21 | explicit MainWindow(QWidget *parent = nullptr, const Qt::WindowFlags flags = {}); 22 | ~MainWindow() override; 23 | 24 | void waitReady(); 25 | 26 | protected: 27 | void closeEvent(QCloseEvent *event) override; 28 | 29 | private: 30 | void initialize(); 31 | 32 | private: 33 | FRAMELESSHELPER_PREPEND_NAMESPACE(StandardTitleBar) *m_titleBar = nullptr; 34 | Ui::MainWindow *m_mainWindow = nullptr; 35 | }; 36 | 37 | #endif // MAINWINDOW_H 38 | -------------------------------------------------------------------------------- /examples/framelesswindow/Widget.h: -------------------------------------------------------------------------------- 1 | #ifndef WIDGET_H 2 | #define WIDGET_H 3 | 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | class QLabel; 8 | class QShortcut; 9 | QT_END_NAMESPACE 10 | 11 | FRAMELESSHELPER_BEGIN_NAMESPACE 12 | class StandardTitleBar; 13 | FRAMELESSHELPER_END_NAMESPACE 14 | 15 | class Widget : public FRAMELESSHELPER_PREPEND_NAMESPACE(FramelessWidget) 16 | { 17 | Q_OBJECT 18 | Q_DISABLE_COPY_MOVE(Widget) 19 | 20 | public: 21 | explicit Widget(QWidget *parent = nullptr); 22 | ~Widget() override; 23 | 24 | void waitReady(); 25 | 26 | protected: 27 | void timerEvent(QTimerEvent *event) override; 28 | void closeEvent(QCloseEvent *event) override; 29 | 30 | private: 31 | void initialize(); 32 | 33 | private Q_SLOTS: 34 | void updateStyleSheet(); 35 | 36 | private: 37 | QLabel *m_clockLabel = nullptr; 38 | FRAMELESSHELPER_PREPEND_NAMESPACE(StandardTitleBar) *m_titleBar = nullptr; 39 | QShortcut *m_fullScreenShortcut = nullptr; 40 | QShortcut *m_cancelShortcut = nullptr; 41 | }; 42 | 43 | #endif // WIDGET_H 44 | -------------------------------------------------------------------------------- /examples/framelesswindow/framelesswindow.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 framelesshelper 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | AcrylicDemo.cpp \ 15 | CustomWidget.cpp \ 16 | Dialog.cpp \ 17 | Widget.cpp \ 18 | main.cpp \ 19 | MainWindow.cpp 20 | 21 | HEADERS += \ 22 | AcrylicDemo.h \ 23 | CustomWidget.h \ 24 | Dialog.h \ 25 | MainWindow.h \ 26 | Widget.h 27 | 28 | FORMS += \ 29 | MainWindow.ui 30 | 31 | # Default rules for deployment. 32 | qnx: target.path = /tmp/$${TARGET}/bin 33 | else: unix:!android: target.path = /opt/$${TARGET}/bin 34 | !isEmpty(target.path): INSTALLS += target 35 | -------------------------------------------------------------------------------- /examples/framelesswindow/main.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | 3 | #include 4 | #include 5 | #include "shared/log.h" 6 | 7 | FRAMELESSHELPER_USE_NAMESPACE 8 | 9 | int main(int argc, char *argv[]) 10 | { 11 | Log::setup(FRAMELESSHELPER_STRING_LITERAL("mainwindow")); 12 | 13 | // Not necessary, but better call this function, before the construction 14 | // of any Q(Core|Gui)Application instances. 15 | FramelessHelper::Widgets::initialize(); 16 | 17 | #if 0 18 | if (!qEnvironmentVariableIsSet("QT_WIDGETS_RHI")) { 19 | qputenv("QT_WIDGETS_RHI", FRAMELESSHELPER_BYTEARRAY_LITERAL("1")); 20 | } 21 | #endif 22 | 23 | const auto application = std::make_unique(argc, argv); 24 | 25 | // Must be called after QGuiApplication has been constructed, we are using 26 | // some private functions from QPA which won't be available until there's 27 | // a QGuiApplication instance. 28 | FramelessHelper::Core::setApplicationOSThemeAware(); 29 | 30 | FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow); 31 | FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial); 32 | 33 | const auto mainWindow = std::make_unique(); 34 | mainWindow->waitReady(); 35 | mainWindow->show(); 36 | 37 | return QCoreApplication::exec(); 38 | } 39 | -------------------------------------------------------------------------------- /examples/gallery/common/GalleryConfig.cpp: -------------------------------------------------------------------------------- 1 | #include "GalleryConfig.h" 2 | 3 | GalleryConfig *GalleryConfig::cfg() 4 | { 5 | static GalleryConfig *config; 6 | if (config == nullptr) { 7 | config = new GalleryConfig(); 8 | } 9 | return config; 10 | } 11 | -------------------------------------------------------------------------------- /examples/gallery/common/GalleryIcon.h: -------------------------------------------------------------------------------- 1 | #ifndef GALLERYICON_H 2 | #define GALLERYICON_H 3 | 4 | #include 5 | 6 | class GalleryIcon : public FluentIconBase 7 | { 8 | Q_OBJECT 9 | public: 10 | enum IconType 11 | { 12 | GRID, 13 | MENU, 14 | TEXT, 15 | EMOJI_TAB_SYMBOLS, 16 | }; 17 | 18 | Q_ENUM(IconType) 19 | 20 | static QString iconName(IconType type); 21 | 22 | GalleryIcon(IconType type, Qfw::Theme t = Qfw::AUTO); 23 | ~GalleryIcon(); 24 | 25 | QString iconPath(); 26 | 27 | QIcon icon() override; 28 | QString typeName() const override; 29 | QString enumName() const override; 30 | FluentIconBase *clone() override; 31 | 32 | Qfw::Theme theme() const; 33 | void setTheme(const Qfw::Theme &theme) override; 34 | 35 | private: 36 | Qfw::Theme m_theme; 37 | IconType m_type; 38 | }; 39 | 40 | #endif // GALLERYICON_H 41 | -------------------------------------------------------------------------------- /examples/gallery/common/GalleryStyleSheet.h: -------------------------------------------------------------------------------- 1 | #ifndef GALLERYSTYLESHEET_H 2 | #define GALLERYSTYLESHEET_H 3 | 4 | #include 5 | 6 | class GalleryStyleSheet : public StyleSheetBase 7 | { 8 | public: 9 | enum Type 10 | { 11 | LINK_CARD, //"link_card" 12 | MAIN_WINDOW, // "main_window" 13 | SAMPLE_CARD, // "sample_card" 14 | HOME_INTERFACE, // "home_interface" 15 | ICON_INTERFACE, // "icon_interface" 16 | VIEW_INTERFACE, // "view_interface" 17 | SETTING_INTERFACE, // "setting_interface" 18 | GALLERY_INTERFACE, // "gallery_interface" 19 | }; 20 | 21 | static QString typeName(Type t); 22 | 23 | QString path(Qfw::Theme theme) override; 24 | static QString content(const QString &name); 25 | QString operator[](Type t); 26 | 27 | static void apply(Type t, QWidget *widget); 28 | 29 | static void apply(const QString &name, QWidget *widget); 30 | }; 31 | 32 | #endif // GALLERYSTYLESHEET_H 33 | -------------------------------------------------------------------------------- /examples/gallery/common/SignalBus.cpp: -------------------------------------------------------------------------------- 1 | #include "SignalBus.h" 2 | 3 | SignalBus::SignalBus(QObject *parent) : QObject(parent) { } 4 | 5 | SignalBus *SignalBus::signalBus() 6 | { 7 | static SignalBus *bus = nullptr; 8 | if (bus == nullptr) { 9 | bus = new SignalBus(); 10 | } 11 | return bus; 12 | } 13 | -------------------------------------------------------------------------------- /examples/gallery/common/SignalBus.h: -------------------------------------------------------------------------------- 1 | #ifndef SIGNALBUS_H 2 | #define SIGNALBUS_H 3 | 4 | #include 5 | 6 | class SignalBus : public QObject 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit SignalBus(QObject *parent = nullptr); 11 | 12 | static SignalBus *signalBus(); 13 | 14 | signals: 15 | 16 | void switchToSampleCard(QString, int); 17 | }; 18 | 19 | #endif // SIGNALBUS_H 20 | -------------------------------------------------------------------------------- /examples/gallery/common/Translator.cpp: -------------------------------------------------------------------------------- 1 | #include "Translator.h" 2 | 3 | Translator::Translator(QObject *parent) : QObject(parent) 4 | { 5 | text = tr("Text"); 6 | view = tr("View"); 7 | menus = tr("Menus"); 8 | icons = tr("Icons"); 9 | layout = tr("Layout"); 10 | dialogs = tr("Dialogs"); 11 | scroll = tr("Scroll"); 12 | material = tr("Material"); 13 | dateTime = tr("Date & Time"); 14 | basicInput = tr("Basic Input"); 15 | statusInfo = tr("Status & Info"); 16 | } 17 | 18 | Translator *Translator::ins() 19 | { 20 | static Translator *single = new Translator(); 21 | return single; 22 | } 23 | -------------------------------------------------------------------------------- /examples/gallery/common/Translator.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSLATOR_H 2 | #define TRANSLATOR_H 3 | 4 | #include 5 | 6 | class Translator : public QObject 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit Translator(QObject *parent = nullptr); 11 | 12 | static Translator *ins(); 13 | 14 | QString text; 15 | QString view; 16 | QString menus; 17 | QString icons; 18 | QString layout; 19 | QString dialogs; 20 | QString scroll; 21 | QString material; 22 | QString dateTime; 23 | QString basicInput; 24 | QString statusInfo; 25 | 26 | signals: 27 | }; 28 | 29 | #endif // TRANSLATOR_H 30 | -------------------------------------------------------------------------------- /examples/gallery/common/Trie.h: -------------------------------------------------------------------------------- 1 | #ifndef TRIE_H 2 | #define TRIE_H 3 | 4 | #include 5 | 6 | class Trie 7 | { 8 | public: 9 | Trie(); 10 | 11 | void insert(QString key, int value); 12 | 13 | int get(QString key, int defaultValue = 0); 14 | 15 | Trie *searchPrefix(QString prefix); 16 | 17 | QMap items(QString prefix); 18 | 19 | private: 20 | QString m_key = ""; 21 | int m_value = 0; 22 | Trie *m_children[26] = { 0 }; 23 | bool m_isEnd = false; 24 | }; 25 | 26 | #endif // TRIE_H 27 | -------------------------------------------------------------------------------- /examples/gallery/components/AvatarWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef AVATARWIDGET_H 2 | #define AVATARWIDGET_H 3 | 4 | #include 5 | 6 | class AvatarWidget : public NavigationWidget 7 | { 8 | public: 9 | AvatarWidget(const QString imagePath, QWidget *parent = nullptr); 10 | 11 | void paintEvent(QPaintEvent *event) override; 12 | 13 | private: 14 | QImage m_avatar; 15 | }; 16 | 17 | #endif // AVATARWIDGET_H 18 | -------------------------------------------------------------------------------- /examples/gallery/components/LinkCard.h: -------------------------------------------------------------------------------- 1 | #ifndef LINKCARD_H 2 | #define LINKCARD_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | class FluentIconBase; 10 | class IconWidget; 11 | class QLabel; 12 | class QVBoxLayout; 13 | class QHBoxLayout; 14 | 15 | class LinkCard : public QFrame 16 | { 17 | public: 18 | LinkCard(FluentIconBase *icon, QString title, QString content, QString const url, QWidget *parent = nullptr); 19 | 20 | private: 21 | void initWidget(); 22 | 23 | void mouseReleaseEvent(QMouseEvent *event) override; 24 | 25 | private: 26 | QUrl m_url; 27 | IconWidget *m_iconWidget; 28 | QLabel *m_titleLabel; 29 | QLabel *m_contentLabel; 30 | IconWidget *m_urlWidget; 31 | 32 | QVBoxLayout *m_vBoxLayout; 33 | }; 34 | 35 | class LinkCardView : public ScrollArea 36 | { 37 | public: 38 | LinkCardView(QWidget *parent = nullptr); 39 | 40 | void addCard(FluentIconBase *icon, QString title, QString content, QString const url); 41 | 42 | private: 43 | QWidget *m_view; 44 | QHBoxLayout *m_hBoxLayout; 45 | }; 46 | 47 | #endif // LINKCARD_H 48 | -------------------------------------------------------------------------------- /examples/gallery/components/SampleCard.h: -------------------------------------------------------------------------------- 1 | #ifndef SAMPLECARD_H 2 | #define SAMPLECARD_H 3 | 4 | #include 5 | 6 | class FluentIconBase; 7 | class QLabel; 8 | class QVBoxLayout; 9 | class FlowLayout; 10 | class IconWidget; 11 | class QHBoxLayout; 12 | 13 | class SampleCard : public QFrame 14 | { 15 | public: 16 | SampleCard(FluentIconBase *icon, QString const title, QString const content, QString const routeKey, int index, 17 | QWidget *parent = nullptr); 18 | 19 | void mouseReleaseEvent(QMouseEvent *event) override; 20 | 21 | private: 22 | int m_index; 23 | QString m_routeKey; 24 | IconWidget *m_iconWidget; 25 | QLabel *m_titleLabel; 26 | QLabel *m_contentLabel; 27 | QHBoxLayout *m_hBoxLayout; 28 | QVBoxLayout *m_vBoxLayout; 29 | }; 30 | 31 | class SampleCardView : public QWidget 32 | { 33 | public: 34 | SampleCardView(QString const title, QWidget *parent = nullptr); 35 | 36 | void addSampleCard(FluentIconBase *icon, QString const title, QString const content, QString const routeKey, 37 | int index); 38 | 39 | private: 40 | QLabel *m_titleLabel; 41 | QVBoxLayout *m_vBoxLayout; 42 | FlowLayout *m_flowLayout; 43 | }; 44 | 45 | #endif // SAMPLECARD_H 46 | -------------------------------------------------------------------------------- /examples/gallery/resource/i18n/gallery_hk.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/i18n/gallery_hk.qm -------------------------------------------------------------------------------- /examples/gallery/resource/i18n/gallery_zh.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/i18n/gallery_zh.qm -------------------------------------------------------------------------------- /examples/gallery/resource/i18n/qfluentwidgets_hk.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/i18n/qfluentwidgets_hk.qm -------------------------------------------------------------------------------- /examples/gallery/resource/i18n/qfluentwidgets_zh.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/i18n/qfluentwidgets_zh.qm -------------------------------------------------------------------------------- /examples/gallery/resource/images/chidanta.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/chidanta.jpg -------------------------------------------------------------------------------- /examples/gallery/resource/images/chidanta2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/chidanta2.jpg -------------------------------------------------------------------------------- /examples/gallery/resource/images/chidanta3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/chidanta3.jpg -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Acrylic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Acrylic.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/AnimatedIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/AnimatedIcon.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/AnimatedVisualPlayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/AnimatedVisualPlayer.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/AnimationInterop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/AnimationInterop.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/AppBarButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/AppBarButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/AppBarSeparator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/AppBarSeparator.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/AppBarToggleButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/AppBarToggleButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/AutoSuggestBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/AutoSuggestBox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/AutomationProperties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/AutomationProperties.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Border.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/BreadcrumbBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/BreadcrumbBar.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Button.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/CalendarDatePicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/CalendarDatePicker.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/CalendarView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/CalendarView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Canvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Canvas.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Checkbox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Clipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Clipboard.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ColorPaletteResources.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ColorPaletteResources.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ColorPicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ColorPicker.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ComboBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ComboBox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/CommandBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/CommandBar.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/CommandBarFlyout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/CommandBarFlyout.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/CompactSizing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/CompactSizing.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ConnectedAnimation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ConnectedAnimation.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ContentDialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ContentDialog.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/CreateMultipleWindows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/CreateMultipleWindows.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/DataGrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/DataGrid.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/DatePicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/DatePicker.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/DropDownButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/DropDownButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/EasingFunction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/EasingFunction.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Expander.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Expander.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/FilePicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/FilePicker.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/FlipView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/FlipView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Flyout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Flyout.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Grid.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/GridView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/GridView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/HyperlinkButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/HyperlinkButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/IconElement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/IconElement.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Image.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ImplicitTransition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ImplicitTransition.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/InfoBadge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/InfoBadge.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/InfoBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/InfoBar.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/InkCanvas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/InkCanvas.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/InkToolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/InkToolbar.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/InputValidation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/InputValidation.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ItemsRepeater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ItemsRepeater.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Line.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ListBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ListBox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ListView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ListView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/MediaPlayerElement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/MediaPlayerElement.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/MenuBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/MenuBar.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/MenuFlyout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/MenuFlyout.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/NavigationView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/NavigationView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/NumberBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/NumberBox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/PageTransition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/PageTransition.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ParallaxView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ParallaxView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/PasswordBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/PasswordBox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/PersonPicture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/PersonPicture.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/PipsPager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/PipsPager.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Pivot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Pivot.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ProgressBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ProgressBar.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ProgressRing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ProgressRing.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/PullToRefresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/PullToRefresh.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RadialGradientBrush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RadialGradientBrush.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RadioButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RadioButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RadioButtons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RadioButtons.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RatingControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RatingControl.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RelativePanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RelativePanel.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RepeatButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RepeatButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RevealFocus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RevealFocus.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RichEditBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RichEditBox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/RichTextBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/RichTextBlock.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ScrollViewer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ScrollViewer.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/SemanticZoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/SemanticZoom.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Shape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Shape.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Slider.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Sound.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Sound.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/SplitButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/SplitButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/SplitView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/SplitView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/StackPanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/StackPanel.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/StandardUICommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/StandardUICommand.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/SwipeControl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/SwipeControl.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/TabView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/TabView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/TeachingTip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/TeachingTip.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/TextBlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/TextBlock.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/TextBox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/TextBox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ThemeTransition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ThemeTransition.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/TimePicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/TimePicker.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/TitleBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/TitleBar.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ToggleButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ToggleButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ToggleSplitButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ToggleSplitButton.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ToggleSwitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ToggleSwitch.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/ToolTip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/ToolTip.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/TreeView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/TreeView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/VariableSizedWrapGrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/VariableSizedWrapGrid.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/Viewbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/Viewbox.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/WebView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/WebView.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/controls/XamlUICommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/controls/XamlUICommand.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/header.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/header1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/header1.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/icons/Text_black.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/gallery/resource/images/icons/Text_white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/gallery/resource/images/kunkun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/kunkun.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/logo.png -------------------------------------------------------------------------------- /examples/gallery/resource/images/shoko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/gallery/resource/images/shoko.png -------------------------------------------------------------------------------- /examples/gallery/resource/qss/dark/home_interface.qss: -------------------------------------------------------------------------------- 1 | SettingInterface, 2 | #view { 3 | background-color: transparent; 4 | } 5 | 6 | QScrollArea { 7 | border: none; 8 | background-color: transparent; 9 | } 10 | 11 | 12 | BannerWidget > #galleryLabel { 13 | font: 42px 'Segoe UI', 'Microsoft YaHei'; 14 | font-weight: bold; 15 | background-color: transparent; 16 | color: white; 17 | padding-left: 28px; 18 | } 19 | 20 | 21 | QScrollBar { 22 | background: transparent; 23 | width: 4px; 24 | margin-top: 32px; 25 | margin-bottom: 0; 26 | padding-right: 2px; 27 | } 28 | 29 | /*隐藏上箭头*/ 30 | QScrollBar::sub-line { 31 | background: transparent; 32 | } 33 | 34 | /*隐藏下箭头*/ 35 | QScrollBar::add-line { 36 | background: transparent; 37 | } 38 | 39 | QScrollBar::handle { 40 | background: rgb(122, 122, 122); 41 | border: 2px solid rgb(128, 128, 128); 42 | border-radius: 1px; 43 | min-height: 32px; 44 | } 45 | 46 | QScrollBar::add-page:vertical, 47 | QScrollBar::sub-page:vertical { 48 | background: none; 49 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/dark/link_card.qss: -------------------------------------------------------------------------------- 1 | LinkCard { 2 | border: 1px solid rgb(46, 46, 46); 3 | border-radius: 10px; 4 | background-color: rgba(39, 39, 39, 0.95); 5 | } 6 | 7 | LinkCard:hover { 8 | background-color: rgba(39, 39, 39, 0.93); 9 | border: 1px solid rgb(66, 66, 66); 10 | } 11 | 12 | #titleLabel { 13 | font: 18px 'Segoe UI', 'Microsoft YaHei'; 14 | color: white; 15 | } 16 | 17 | #contentLabel { 18 | font: 12px 'Segoe UI', 'Microsoft YaHei'; 19 | color: rgb(208, 208, 208); 20 | } 21 | 22 | LinkCardView { 23 | background-color: transparent; 24 | border: none; 25 | } 26 | 27 | #view { 28 | background-color: transparent; 29 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/dark/sample_card.qss: -------------------------------------------------------------------------------- 1 | SampleCard { 2 | border: 1px solid rgb(35, 35, 35); 3 | border-radius: 6px; 4 | background-color: rgb(50, 50, 50); 5 | } 6 | 7 | SampleCard:hover { 8 | background-color: rgb(62, 62, 62); 9 | border-color: rgb(37, 37, 37); 10 | } 11 | 12 | 13 | #titleLabel { 14 | color: white; 15 | font: 14px 'Segoe UI', 'Microsoft YaHei'; 16 | font-weight: bold; 17 | } 18 | 19 | #contentLabel { 20 | color: rgb(208, 208, 208); 21 | font: 12px 'Segoe UI', 'Microsoft YaHei'; 22 | } 23 | 24 | #viewTitleLabel { 25 | color: white; 26 | font: 20px "Segoe UI SemiBold", "Microsoft YaHei"; 27 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/dark/setting_interface.qss: -------------------------------------------------------------------------------- 1 | SettingInterface, #scrollWidget { 2 | background-color: transparent; 3 | } 4 | 5 | QScrollArea { 6 | border: none; 7 | background-color: transparent; 8 | } 9 | 10 | 11 | /* 标签 */ 12 | QLabel#settingLabel { 13 | font: 33px 'Microsoft YaHei Light'; 14 | background-color: transparent; 15 | color: white; 16 | } 17 | 18 | 19 | /* 滚动条 */ 20 | QScrollBar { 21 | background: transparent; 22 | width: 4px; 23 | margin-top: 32px; 24 | margin-bottom: 0; 25 | padding-right: 2px; 26 | } 27 | 28 | /*隐藏上箭头*/ 29 | QScrollBar::sub-line { 30 | background: transparent; 31 | } 32 | 33 | /*隐藏下箭头*/ 34 | QScrollBar::add-line { 35 | background: transparent; 36 | } 37 | 38 | QScrollBar::handle { 39 | background: rgb(122, 122, 122); 40 | border: 2px solid rgb(128, 128, 128); 41 | border-radius: 1px; 42 | min-height: 32px; 43 | } 44 | 45 | QScrollBar::add-page:vertical, 46 | QScrollBar::sub-page:vertical { 47 | background: none; 48 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/dark/view_interface.qss: -------------------------------------------------------------------------------- 1 | #frame { 2 | border: 1px solid rgba(255, 255, 255, 13); 3 | border-radius: 5px; 4 | background-color: transparent; 5 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/light/home_interface.qss: -------------------------------------------------------------------------------- 1 | SettingInterface, 2 | #view { 3 | background-color: transparent; 4 | } 5 | 6 | QScrollArea { 7 | border: none; 8 | background-color: transparent; 9 | } 10 | 11 | 12 | BannerWidget > #galleryLabel { 13 | font: 42px 'Segoe UI SemiBold', 'Microsoft YaHei SemiBold'; 14 | background-color: transparent; 15 | color: black; 16 | padding-left: 28px; 17 | } 18 | 19 | 20 | QScrollBar { 21 | background: transparent; 22 | width: 4px; 23 | margin-top: 32px; 24 | margin-bottom: 0; 25 | padding-right: 2px; 26 | } 27 | 28 | /*隐藏上箭头*/ 29 | QScrollBar::sub-line { 30 | background: transparent; 31 | } 32 | 33 | /*隐藏下箭头*/ 34 | QScrollBar::add-line { 35 | background: transparent; 36 | } 37 | 38 | QScrollBar::handle { 39 | background: rgb(122, 122, 122); 40 | border: 2px solid rgb(128, 128, 128); 41 | border-radius: 1px; 42 | min-height: 32px; 43 | } 44 | 45 | QScrollBar::add-page:vertical, 46 | QScrollBar::sub-page:vertical { 47 | background: none; 48 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/light/link_card.qss: -------------------------------------------------------------------------------- 1 | LinkCard { 2 | border: 1px solid rgb(234, 234, 234); 3 | border-radius: 10px; 4 | background-color: rgba(249, 249, 249, 0.95); 5 | } 6 | 7 | LinkCard:hover { 8 | background-color: rgba(249, 249, 249, 0.93); 9 | border: 1px solid rgb(220, 220, 220); 10 | } 11 | 12 | #titleLabel { 13 | font: 18px 'Segoe UI', 'Microsoft YaHei'; 14 | color: black; 15 | } 16 | 17 | #contentLabel { 18 | font: 12px 'Segoe UI', 'Microsoft YaHei'; 19 | color: rgb(93, 93, 93); 20 | } 21 | 22 | LinkCardView { 23 | background-color: transparent; 24 | border: none; 25 | } 26 | 27 | #view { 28 | background-color: transparent; 29 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/light/main_window.qss: -------------------------------------------------------------------------------- 1 | StackedWidget { 2 | border: 1px solid rgb(229, 229, 229); 3 | border-right: none; 4 | border-bottom: none; 5 | border-top-left-radius: 10px; 6 | background-color: rgb(249, 249, 249); 7 | } 8 | 9 | MainWindow { 10 | background-color: rgb(243, 243, 243); 11 | } 12 | 13 | CustomTitleBar > QLabel#titleLabel { 14 | color: black; 15 | background: transparent; 16 | font: 13px 'Segoe UI'; 17 | padding: 0 4px 18 | } 19 | 20 | MinimizeButton { 21 | qproperty-normalColor: black; 22 | qproperty-normalBackgroundColor: transparent; 23 | qproperty-hoverColor: black; 24 | qproperty-hoverBackgroundColor: rgba(0, 0, 0, 26); 25 | qproperty-pressedColor: black; 26 | qproperty-pressedBackgroundColor: rgba(0, 0, 0, 51) 27 | } 28 | 29 | 30 | MaximizeButton { 31 | qproperty-normalColor: black; 32 | qproperty-normalBackgroundColor: transparent; 33 | qproperty-hoverColor: black; 34 | qproperty-hoverBackgroundColor: rgba(0, 0, 0, 26); 35 | qproperty-pressedColor: black; 36 | qproperty-pressedBackgroundColor: rgba(0, 0, 0, 51) 37 | } 38 | 39 | CloseButton { 40 | qproperty-normalColor: black; 41 | qproperty-normalBackgroundColor: transparent; 42 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/light/sample_card.qss: -------------------------------------------------------------------------------- 1 | SampleCard { 2 | border: 1px solid rgb(234, 234, 234); 3 | border-radius: 6px; 4 | background-color: rgb(253, 253, 253); 5 | } 6 | 7 | SampleCard:hover { 8 | background-color: rgb(251, 251, 251); 9 | border-color: rgb(177, 177, 177); 10 | } 11 | 12 | #titleLabel { 13 | color: black; 14 | font: 14px 'Segoe UI', 'Microsoft YaHei'; 15 | font-weight: bold; 16 | } 17 | 18 | #contentLabel { 19 | color: rgb(118, 118, 118); 20 | font: 12px 'Segoe UI', 'Microsoft YaHei'; 21 | } 22 | 23 | #viewTitleLabel { 24 | color: black; 25 | font: 20px "Segoe UI SemiBold", "Microsoft YaHei"; 26 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/light/setting_interface.qss: -------------------------------------------------------------------------------- 1 | SettingInterface, #scrollWidget { 2 | background-color: transparent; 3 | } 4 | 5 | QScrollArea { 6 | background-color: transparent; 7 | border: none; 8 | } 9 | 10 | 11 | /* 标签 */ 12 | QLabel#settingLabel { 13 | font: 33px 'Microsoft YaHei Light'; 14 | background-color: transparent; 15 | } 16 | 17 | 18 | /* 滚动条 */ 19 | QScrollBar { 20 | background: transparent; 21 | width: 4px; 22 | margin-top: 32px; 23 | margin-bottom: 0; 24 | padding-right: 2px; 25 | } 26 | 27 | /*隐藏上箭头*/ 28 | QScrollBar::sub-line { 29 | background: transparent; 30 | } 31 | 32 | /*隐藏下箭头*/ 33 | QScrollBar::add-line { 34 | background: transparent; 35 | } 36 | 37 | QScrollBar::handle { 38 | background: rgb(122, 122, 122); 39 | border: 2px solid rgb(128, 128, 128); 40 | border-radius: 1px; 41 | min-height: 32px; 42 | } 43 | 44 | QScrollBar::add-page:vertical, 45 | QScrollBar::sub-page:vertical { 46 | background: none; 47 | } -------------------------------------------------------------------------------- /examples/gallery/resource/qss/light/view_interface.qss: -------------------------------------------------------------------------------- 1 | #frame { 2 | border: 1px solid rgba(0, 0, 0, 15); 3 | border-radius: 5px; 4 | background-color: transparent; 5 | } -------------------------------------------------------------------------------- /examples/gallery/view/BasicInputInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef BASICINPUTINTERFACE_H 2 | #define BASICINPUTINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class SwitchButton; 7 | 8 | class BasicInputInterface : public GalleryInterface 9 | { 10 | public: 11 | BasicInputInterface(QWidget *parent = nullptr); 12 | 13 | void onSwitchCheckedChanged(bool isChecked); 14 | 15 | private: 16 | SwitchButton *m_switchButton; 17 | }; 18 | 19 | #endif // BASICINPUTINTERFACE_H 20 | -------------------------------------------------------------------------------- /examples/gallery/view/DateTimeInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef DATETIMEINTERFACE_H 2 | #define DATETIMEINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class DateTimeInterface : public GalleryInterface 7 | { 8 | public: 9 | DateTimeInterface(QWidget *parent = nullptr); 10 | }; 11 | 12 | #endif // DATETIMEINTERFACE_H 13 | -------------------------------------------------------------------------------- /examples/gallery/view/DialogInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOGINTERFACE_H 2 | #define DIALOGINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class DialogInterface : public GalleryInterface 7 | { 8 | public: 9 | DialogInterface(QWidget *parent = nullptr); 10 | 11 | void showDialog(); 12 | 13 | void showMessageDialog(); 14 | 15 | void showColorDialog(); 16 | }; 17 | 18 | #endif // DIALOGINTERFACE_H 19 | -------------------------------------------------------------------------------- /examples/gallery/view/GalleryTitleBar.cpp: -------------------------------------------------------------------------------- 1 | #include "GalleryTitleBar.h" 2 | 3 | GalleryTitleBar::GalleryTitleBar(QWidget *parent) : StandardTitleBar(parent) 4 | { 5 | setStyleSheet("background-color: rgb(243, 243, 243);"); 6 | } 7 | -------------------------------------------------------------------------------- /examples/gallery/view/GalleryTitleBar.h: -------------------------------------------------------------------------------- 1 | #ifndef GALLERYTITLEBAR_H 2 | #define GALLERYTITLEBAR_H 3 | 4 | #include 5 | 6 | // typedef FRAMELESSHELPER_PREPEND_NAMESPACE(StandardTitleBar) StandardTitleBar; 7 | 8 | #include 9 | 10 | class GalleryTitleBar : public StandardTitleBar 11 | { 12 | public: 13 | GalleryTitleBar(QWidget *parent = nullptr); 14 | 15 | private: 16 | }; 17 | 18 | #endif // GALLERYTITLEBAR_H 19 | -------------------------------------------------------------------------------- /examples/gallery/view/HomeInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef HOMEINTERFACE_H 2 | #define HOMEINTERFACE_H 3 | 4 | #include 5 | 6 | class QVBoxLayout; 7 | class QLabel; 8 | class LinkCardView; 9 | 10 | class BannerWidget : public QWidget 11 | { 12 | 13 | public: 14 | BannerWidget(QWidget *parent = nullptr); 15 | 16 | void paintEvent(QPaintEvent *event) override; 17 | 18 | private: 19 | QVBoxLayout *m_vBoxLayout; 20 | QLabel *m_galleryLabel; 21 | QPixmap m_banner; 22 | LinkCardView *m_linkCardView; 23 | }; 24 | 25 | class HomeInterface : public ScrollArea 26 | { 27 | public: 28 | HomeInterface(QWidget *parent = nullptr); 29 | 30 | private: 31 | void initWidget(); 32 | 33 | void loadSamples(); 34 | 35 | private: 36 | BannerWidget *m_banner; 37 | QWidget *m_view; 38 | QVBoxLayout *m_vBoxLayout; 39 | }; 40 | 41 | #endif // HOMEINTERFACE_H 42 | -------------------------------------------------------------------------------- /examples/gallery/view/LayoutInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef LAYOUTINTERFACE_H 2 | #define LAYOUTINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class LayoutInterface : public GalleryInterface 7 | { 8 | public: 9 | LayoutInterface(QWidget *parent = nullptr); 10 | 11 | QWidget *createWidget(bool animation = false); 12 | }; 13 | 14 | #endif // LAYOUTINTERFACE_H 15 | -------------------------------------------------------------------------------- /examples/gallery/view/MaterialInterface.cpp: -------------------------------------------------------------------------------- 1 | #include "MaterialInterface.h" 2 | 3 | #include "common/Translator.h" 4 | #include "common/GalleryConfig.h" 5 | 6 | #include 7 | 8 | MaterialInterface::MaterialInterface(QWidget *parent) 9 | : GalleryInterface(Translator::ins()->material, "qfluentwidgets.components.widgets", parent) 10 | { 11 | return; 12 | GalleryConfig *cfg = GalleryConfig::cfg(); 13 | m_label->setImage(":/resource/images/chidanta.jpg"); 14 | m_label->setMaximumSize(787, 579); 15 | m_label->setMinimumSize(197, 145); 16 | 17 | addExampleCard(tr("Acrylic label"), m_label, 18 | "https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/acrylic_label/demo.py", 1); 19 | } 20 | 21 | void MaterialInterface::onBlurRadiusChanged(int radius) 22 | { 23 | m_label->setBlurRadius(radius); 24 | m_label->setImage(":/resource/images/chidanta.jpg"); 25 | } 26 | -------------------------------------------------------------------------------- /examples/gallery/view/MaterialInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef MATERIALINTERFACE_H 2 | #define MATERIALINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class AcrylicLabel; 7 | 8 | class MaterialInterface : public GalleryInterface 9 | { 10 | public: 11 | MaterialInterface(QWidget *parent = nullptr); 12 | 13 | void onBlurRadiusChanged(int radius); 14 | 15 | private: 16 | AcrylicLabel *m_label; 17 | }; 18 | 19 | #endif // MATERIALINTERFACE_H 20 | -------------------------------------------------------------------------------- /examples/gallery/view/MenuInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef MENUINTERFACE_H 2 | #define MENUINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class MenuInterface : public GalleryInterface 7 | { 8 | public: 9 | MenuInterface(QWidget *parent = nullptr); 10 | 11 | void createMenu(QPoint pos); 12 | }; 13 | 14 | #endif // MENUINTERFACE_H 15 | -------------------------------------------------------------------------------- /examples/gallery/view/ScrollInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef SCROLLINTERFACE_H 2 | #define SCROLLINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class ScrollInterface : public GalleryInterface 7 | { 8 | public: 9 | ScrollInterface(QWidget *parent = nullptr); 10 | }; 11 | 12 | #endif // SCROLLINTERFACE_H 13 | -------------------------------------------------------------------------------- /examples/gallery/view/StatusInfoInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef STATUSINFOINTERFACE_H 2 | #define STATUSINFOINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class StateToolTip; 7 | 8 | class StatusInfoInterface : public GalleryInterface 9 | { 10 | Q_OBJECT 11 | public: 12 | StatusInfoInterface(QWidget *parent = nullptr); 13 | 14 | private slots: 15 | 16 | void onStateButtonClicked(); 17 | 18 | void createTopRightInfoBar(); 19 | 20 | void createTopInfoBar(); 21 | 22 | void createTopLeftInfoBar(); 23 | 24 | void createBottomRightInfoBar(); 25 | 26 | void createBottomInfoBar(); 27 | 28 | void createBottomLeftInfoBar(); 29 | 30 | private: 31 | StateToolTip *m_stateTooltip = nullptr; 32 | }; 33 | 34 | #endif // STATUSINFOINTERFACE_H 35 | -------------------------------------------------------------------------------- /examples/gallery/view/TextInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef TEXTINTERFACE_H 2 | #define TEXTINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class TextInterface : public GalleryInterface 7 | { 8 | public: 9 | TextInterface(QWidget *parent = nullptr); 10 | }; 11 | 12 | #endif // TEXTINTERFACE_H 13 | -------------------------------------------------------------------------------- /examples/gallery/view/ViewInterface.h: -------------------------------------------------------------------------------- 1 | #ifndef VIEWINTERFACE_H 2 | #define VIEWINTERFACE_H 3 | 4 | #include "GalleryInterface.h" 5 | 6 | class AFrame : public QFrame 7 | { 8 | public: 9 | AFrame(QWidget *parent = nullptr); 10 | 11 | void addWidget(QWidget *widget); 12 | 13 | private: 14 | QHBoxLayout *m_hBoxLayout; 15 | }; 16 | 17 | class TreeWidget; 18 | 19 | class TreeFrame : public AFrame 20 | { 21 | public: 22 | TreeFrame(QWidget *parent = nullptr, bool enableClick = false); 23 | 24 | private: 25 | TreeWidget *m_tree; 26 | }; 27 | 28 | class ViewInterface : public GalleryInterface 29 | { 30 | public: 31 | ViewInterface(QWidget *parent = nullptr); 32 | }; 33 | 34 | #endif // VIEWINTERFACE_H 35 | -------------------------------------------------------------------------------- /examples/openglwidget/Logo.h: -------------------------------------------------------------------------------- 1 | #ifndef LOGO_H 2 | #define LOGO_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class Logo 9 | { 10 | public: 11 | Logo(); 12 | const GLfloat *constData() const { return m_data.constData(); } 13 | int count() const { return m_count; } 14 | int vertexCount() const { return m_count / 6; } 15 | 16 | private: 17 | void quad(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2, GLfloat x3, GLfloat y3, GLfloat x4, GLfloat y4); 18 | void extrude(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); 19 | void add(const QVector3D &v, const QVector3D &n); 20 | 21 | QVector m_data; 22 | int m_count = 0; 23 | }; 24 | 25 | #endif // LOGO_H 26 | -------------------------------------------------------------------------------- /examples/openglwidget/MainWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | FRAMELESSHELPER_BEGIN_NAMESPACE 7 | class StandardTitleBar; 8 | FRAMELESSHELPER_END_NAMESPACE 9 | 10 | class GLWidget; 11 | 12 | class MainWindow : public FRAMELESSHELPER_PREPEND_NAMESPACE(FramelessWidget) 13 | { 14 | Q_OBJECT 15 | Q_DISABLE_COPY_MOVE(MainWindow) 16 | 17 | public: 18 | explicit MainWindow(QWidget *parent = nullptr); 19 | ~MainWindow() override; 20 | 21 | void waitReady(); 22 | 23 | protected: 24 | void closeEvent(QCloseEvent *event) override; 25 | 26 | private: 27 | void initialize(); 28 | 29 | private: 30 | FRAMELESSHELPER_PREPEND_NAMESPACE(StandardTitleBar) *m_titleBar = nullptr; 31 | GLWidget *m_glWidget = nullptr; 32 | }; 33 | 34 | #endif // MAINWINDOW_H 35 | -------------------------------------------------------------------------------- /examples/openglwidget/images.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | images/qtlogo.png 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/openglwidget/images/qtlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/examples/openglwidget/images/qtlogo.png -------------------------------------------------------------------------------- /examples/openglwidget/openglwidget.pro: -------------------------------------------------------------------------------- 1 | QT += core gui opengl 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++17 framelesshelper 6 | 7 | include($$PWD/../baseconfig.pri) 8 | 9 | # You can make your code fail to compile if it uses deprecated APIs. 10 | # In order to do so, uncomment the following line. 11 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 12 | 13 | SOURCES += \ 14 | GLWidget.cpp \ 15 | Logo.cpp \ 16 | main.cpp \ 17 | MainWindow.cpp 18 | 19 | HEADERS += \ 20 | GLWidget.h \ 21 | Logo.h \ 22 | MainWindow.h 23 | 24 | # Default rules for deployment. 25 | qnx: target.path = /tmp/$${TARGET}/bin 26 | else: unix:!android: target.path = /opt/$${TARGET}/bin 27 | !isEmpty(target.path): INSTALLS += target 28 | 29 | RESOURCES += \ 30 | images.qrc 31 | -------------------------------------------------------------------------------- /examples/share.pri: -------------------------------------------------------------------------------- 1 | INCLUDEPATH += $$PWD/../3rdparty/framelesshelper/examples 2 | HEADERS += \ 3 | $$PWD/../3rdparty/framelesshelper/examples/shared/log.h \ 4 | $$PWD/../3rdparty/framelesshelper/examples/shared/settings.h 5 | 6 | SOURCES += \ 7 | $$PWD/../3rdparty/framelesshelper/examples/shared/log.cpp \ 8 | $$PWD/../3rdparty/framelesshelper/examples/shared/settings.cpp 9 | -------------------------------------------------------------------------------- /share/msbuild/QFluentWidgets.props.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @MSBUILD_QFUI_INSTALL_PREFIX@\@MSBUILD_QFUI_INSTALL_LIBDIR@;$(LibraryPath) 5 | 6 | 7 | @MSBUILD_QFUI_INSTALL_PREFIX@\@MSBUILD_QFUI_INSTALL_INCDIR@\QFluentWidgets;$(QtHeaderSearchPath) 8 | 9 | 10 | 11 | %(PreprocessorDefinitions) 12 | 13 | 14 | @MSBUILD_QFUI_LIBRARY_LIST_DEBUG@;%(AdditionalDependencies); 15 | @MSBUILD_QFUI_LIBRARY_LIST_RELEASE@;%(AdditionalDependencies); 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /share/qmake/QFUIWidgets.pri.in: -------------------------------------------------------------------------------- 1 | !defined(QMAKE_QFUI_CORE_INCLUDED, var) { 2 | QMAKE_QFUI_CORE_INCLUDED = 1 3 | 4 | # CMake variables 5 | QMAKE_QFUI_INSTALL_PREFIX = @QMAKE_QFUI_INSTALL_PREFIX@ 6 | QMAKE_QFUI_INSTALL_BINDIR = @QMAKE_QFUI_INSTALL_BINDIR@ 7 | QMAKE_QFUI_INSTALL_LIBDIR = @QMAKE_QFUI_INSTALL_LIBDIR@ 8 | QMAKE_QFUI_INSTALL_INCDIR = @QMAKE_QFUI_INSTALL_INCDIR@ 9 | 10 | # Shared include directory 11 | INCLUDEPATH += \ 12 | $$QMAKE_QFUI_INSTALL_PREFIX/$$QMAKE_QFUI_INSTALL_INCDIR/QFluentWidgets 13 | 14 | # Shared link directory 15 | LIBS += \ 16 | "-L$$QMAKE_QFUI_INSTALL_PREFIX/$$QMAKE_QFUI_INSTALL_LIBDIR" 17 | 18 | CONFIG(debug, debug|release) { 19 | LIBS += -l@QMAKE_QFUI_CORE_NAME_DEBUG@ 20 | } else { 21 | LIBS += -l@QMAKE_QFUI_CORE_NAME_RELEASE@ 22 | } 23 | } -------------------------------------------------------------------------------- /src/QFluentWidgetsConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include(CMakeFindDependencyMacro) 4 | 5 | find_dependency(QT NAMES Qt6 Qt5 COMPONENTS Core Gui REQUIRED) 6 | find_dependency(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui REQUIRED) 7 | 8 | if ("Widgets" IN_LIST QWindowKit_FIND_COMPONENTS) 9 | find_dependency(QT NAMES Qt6 Qt5 Widgets REQUIRED) 10 | find_dependency(Qt${QT_VERSION_MAJOR} Widgets REQUIRED) 11 | endif() 12 | 13 | include("${CMAKE_CURRENT_LIST_DIR}/QWindowKitTargets.cmake") -------------------------------------------------------------------------------- /src/core/Common/AutoWrap.h: -------------------------------------------------------------------------------- 1 | #ifndef AUTOWRAP_H 2 | #define AUTOWRAP_H 3 | 4 | #include 5 | #include 6 | 7 | struct CharWidthType 8 | { 9 | int num; 10 | int width; 11 | }; 12 | 13 | class TextWrap 14 | { 15 | public: 16 | /// Return the screen column width for a char 17 | static int getWidth(QChar c); 18 | 19 | static QPair wrap(const QString &text, int width, bool once = true); 20 | }; 21 | 22 | #endif // AUTOWRAP_H 23 | -------------------------------------------------------------------------------- /src/core/Common/ImageUtils.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGEUTILS_H 2 | #define IMAGEUTILS_H 3 | 4 | #include 5 | 6 | class GaussianBlur 7 | { 8 | public: 9 | GaussianBlur(int blurRadius, float sigma); 10 | 11 | QImage BlurImage(const QImage &in); 12 | 13 | float GaussFunc(float x); 14 | 15 | int getBlurRadius() const; 16 | void setBlurRadius(int value); 17 | 18 | float getSigma() const; 19 | void setSigma(float value); 20 | 21 | ~GaussianBlur(); 22 | 23 | private: 24 | QVector m_convolutionMatrix; 25 | 26 | int ReflectIndex(int x, int length); 27 | void CreateConvolutionMatrix(); 28 | 29 | int m_blurRadius; 30 | float m_sigma; 31 | }; 32 | 33 | class DominantColor 34 | { 35 | public: 36 | /// 获取主色 37 | static QColor getDominantColor(const QString &imagePath, int step = 20); 38 | }; 39 | 40 | #endif // IMAGEUTILS_H 41 | -------------------------------------------------------------------------------- /src/core/Common/SmoothScroll.h: -------------------------------------------------------------------------------- 1 | #ifndef SMOOTHSCROLL_H 2 | #define SMOOTHSCROLL_H 3 | 4 | #include 5 | #include 6 | 7 | enum SmoothMode 8 | { 9 | NO_SMOOTH = 0, 10 | CONSTANT = 1, 11 | LINEAR = 2, 12 | QUADRATI = 3, 13 | COSINE = 4 14 | }; 15 | 16 | class SmoothScroll : public QObject 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | struct StepsLeftElement 22 | { 23 | double delta; 24 | double stepLeft; 25 | }; 26 | 27 | explicit SmoothScroll(QAbstractScrollArea *widget, Qt::Orientation orient = Qt::Vertical); 28 | 29 | void setSmoothMode(const SmoothMode &smoothMode); 30 | SmoothMode smoothMode() const; 31 | 32 | void wheelEvent(QWheelEvent *event); 33 | 34 | private slots: 35 | void smoothMove(); 36 | 37 | private: 38 | double subDelta(double delta, double stepsLeft); 39 | 40 | private: 41 | QAbstractScrollArea *m_widget; 42 | Qt::Orientation m_orient; 43 | int m_fps; 44 | int m_duration; 45 | double m_stepsTotal; 46 | double m_stepRatio; 47 | double m_acceleration; 48 | QScopedPointer m_lastWheelEvent; 49 | QQueue m_scrollStamps; 50 | QQueue m_stepsLeftQueue; 51 | QScopedPointer m_smoothMoveTimer; 52 | SmoothMode m_smoothMode; 53 | }; 54 | 55 | #endif // SMOOTHSCROLL_H 56 | -------------------------------------------------------------------------------- /src/core/Common/Theme.h: -------------------------------------------------------------------------------- 1 | #ifndef THEME_H 2 | #define THEME_H 3 | 4 | #include 5 | 6 | namespace Qfw 7 | { 8 | enum Theme 9 | { 10 | LIGHT = 0, 11 | DARK, 12 | AUTO, 13 | }; 14 | 15 | static inline QString ThemeString(Theme t) 16 | { 17 | switch (t) { 18 | case LIGHT: 19 | return "Light"; 20 | case DARK: { 21 | return "Dark"; 22 | } 23 | case AUTO: { 24 | return "Auto"; 25 | } 26 | } 27 | 28 | // default 29 | return "Light"; 30 | } 31 | 32 | } // namespace Qfw 33 | 34 | #endif // THEME_H 35 | -------------------------------------------------------------------------------- /src/core/DialogBox/HuePanel.h: -------------------------------------------------------------------------------- 1 | #ifndef HUEPANEL_H 2 | #define HUEPANEL_H 3 | 4 | #include 5 | 6 | class HuePanel : public QWidget 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit HuePanel(const QColor &c = QColor(255, 0, 0), QWidget *parent = nullptr); 11 | 12 | void setColor(const QColor &c); 13 | int hue() const; // 0 <= hue < 360 14 | int saturation() const; 15 | void setPickerPosition(const QPoint &pos); 16 | 17 | // QWidget interface 18 | protected: 19 | void mousePressEvent(QMouseEvent *event) override; 20 | void mouseMoveEvent(QMouseEvent *event) override; 21 | void paintEvent(QPaintEvent *event) override; 22 | 23 | signals: 24 | void colorChanged(const QColor &); 25 | 26 | private: 27 | QPixmap huePixmap; 28 | QColor color; 29 | QPoint pickerPos; 30 | }; 31 | 32 | #endif // HUEPANEL_H 33 | -------------------------------------------------------------------------------- /src/core/DialogBox/MaskDialogBase.h: -------------------------------------------------------------------------------- 1 | #ifndef MASKDIALOGBASE_H 2 | #define MASKDIALOGBASE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class MaskDialogBase : public QDialog 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit MaskDialogBase(QWidget *parent = nullptr); 13 | 14 | void setShadowEffect(float blurRadius = 60, const QPointF &offset = QPoint(0, 10), 15 | const QColor &color = QColor(0, 0, 0, 100)); 16 | void setMaskColor(const QColor &color); 17 | 18 | QFrame *widget; 19 | QWidget *windowMask; 20 | 21 | // QWidget interface 22 | QHBoxLayout *hBoxLayout() const; 23 | 24 | protected: 25 | bool eventFilter(QObject *watched, QEvent *event) override; 26 | void resizeEvent(QResizeEvent *event) override; 27 | void closeEvent(QCloseEvent *event) override; 28 | void showEvent(QShowEvent *event) override; 29 | 30 | signals: 31 | 32 | private: 33 | QHBoxLayout *m_hBoxLayout; 34 | }; 35 | 36 | #endif // MASKDIALOGBASE_H 37 | -------------------------------------------------------------------------------- /src/core/DialogBox/MessageDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef MESSAGEDIALOG_H 2 | #define MESSAGEDIALOG_H 3 | 4 | #include "MaskDialogBase.h" 5 | 6 | #include 7 | #include 8 | 9 | class MessageDialog : public MaskDialogBase 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit MessageDialog(const QString &title, const QString &content, QWidget *parent = nullptr); 14 | 15 | private: 16 | void initWidget(); 17 | void initLayout(); 18 | void setQss(); 19 | 20 | private slots: 21 | void onCancelButtonClicked(); 22 | void onYesButtonClicked(); 23 | 24 | signals: 25 | void yesSignal(); 26 | void cancelSignal(); 27 | 28 | private: 29 | QString m_content; 30 | QLabel *m_titleLabel; 31 | QLabel *m_contentLabel; 32 | QPushButton *m_yesButton; 33 | QPushButton *m_cancelButton; 34 | }; 35 | 36 | #endif // MESSAGEDIALOG_H 37 | -------------------------------------------------------------------------------- /src/core/Layout/ExpandLayout.h: -------------------------------------------------------------------------------- 1 | #ifndef EXPANDLAYOUT_H 2 | #define EXPANDLAYOUT_H 3 | 4 | #include 5 | 6 | class ExpandLayout : public QLayout 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit ExpandLayout(QWidget *parent = nullptr); 11 | ~ExpandLayout(); 12 | 13 | void addWidget(QWidget *w); 14 | QSize sizeHint() const override; 15 | void addItem(QLayoutItem *item) override; 16 | QLayoutItem *itemAt(int index) const override; 17 | QLayoutItem *takeAt(int index) override; 18 | int count() const override; 19 | QSize minimumSize() const override; 20 | Qt::Orientations expandingDirections() const override; 21 | void setGeometry(const QRect &rect) override; 22 | bool hasHeightForWidth() const override; 23 | int heightForWidth(int width) const override; 24 | bool eventFilter(QObject *watched, QEvent *event) override; 25 | 26 | void removeAllItems(); 27 | 28 | signals: 29 | 30 | private: 31 | int doLayout(const QRect &rect, bool move) const; 32 | 33 | QList m_items; 34 | QList m_widgets; 35 | }; 36 | 37 | #endif // EXPANDLAYOUT_H 38 | -------------------------------------------------------------------------------- /src/core/Layout/VBoxLayout.h: -------------------------------------------------------------------------------- 1 | #ifndef VBOXLAYOUT_H 2 | #define VBOXLAYOUT_H 3 | 4 | #include 5 | 6 | class VBoxLayout : public QVBoxLayout 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit VBoxLayout(QWidget *parent = nullptr); 11 | ~VBoxLayout(); 12 | 13 | void addWidgets(const QList &widgets, int stretch = 0, Qt::Alignment alignment = Qt::AlignTop); 14 | void addWidget(QWidget *widget, int stretch = 0, Qt::Alignment alignment = Qt::AlignTop); 15 | void removeWidget(QWidget *widget); 16 | void deleteWidget(QWidget *widget); 17 | void removeAllWidget(); 18 | void removeAllItems(); 19 | 20 | QList widgets() const; 21 | 22 | signals: 23 | 24 | private: 25 | QList m_widgets; 26 | }; 27 | 28 | #endif // VBOXLAYOUT_H 29 | -------------------------------------------------------------------------------- /src/core/QFluentWidgets.cpp: -------------------------------------------------------------------------------- 1 | #include "QFluentWidgets.h" 2 | 3 | #include 4 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 5 | #include 6 | #else 7 | #include 8 | #endif 9 | 10 | QFluentWidgets::QFluentWidgets() 11 | { 12 | m_config.reset(new Qfw::QConfig(this)); 13 | m_theme = m_config->theme(); 14 | m_themeColor = m_config->themeColor(); 15 | } 16 | 17 | void QFluentWidgets::setConfigPath(const QString &path) 18 | { 19 | m_config.reset(new Qfw::QConfig(path, this)); 20 | m_theme = m_config->theme(); 21 | m_themeColor = m_config->themeColor(); 22 | } 23 | 24 | Qfw::Theme QFluentWidgets::theme() const 25 | { 26 | return m_theme; 27 | } 28 | 29 | QString QFluentWidgets::themeName() const 30 | { 31 | return Qfw::ThemeString(m_theme); 32 | } 33 | 34 | void QFluentWidgets::setTheme(const Qfw::Theme &theme) 35 | { 36 | m_theme = theme; 37 | } 38 | 39 | QColor QFluentWidgets::themeColor() const 40 | { 41 | return m_themeColor; 42 | } 43 | 44 | void QFluentWidgets::setThemeColor(const QColor &themeColor) 45 | { 46 | m_themeColor = themeColor; 47 | } 48 | 49 | bool QFluentWidgets::isDarkTheme() 50 | { 51 | return theme() == Qfw::DARK; 52 | } 53 | -------------------------------------------------------------------------------- /src/core/Settings/OptionsSettingCard.h: -------------------------------------------------------------------------------- 1 | #ifndef OPTIONSSETTINGCARD_H 2 | #define OPTIONSSETTINGCARD_H 3 | 4 | #include "ExpandGroupSettingCard.h" 5 | 6 | #include 7 | 8 | class OptionsSettingCard : public ExpandSettingCard 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit OptionsSettingCard(const QVariant &configItem, const QString &title, const QString &content = "", 13 | const QStringList &texts = {}, QWidget *parent = nullptr); 14 | 15 | void setValue(const QVariant &value) override; 16 | 17 | private slots: 18 | void onButtonClicked(QAbstractButton *button); 19 | 20 | signals: 21 | void optionChanged(const QVariant &); 22 | 23 | private: 24 | QVariant m_configItem; 25 | QString m_configName; 26 | QStringList m_texts; 27 | QLabel *m_choiceLabel; 28 | QButtonGroup *m_buttonGroup; 29 | }; 30 | 31 | #endif // OPTIONSSETTINGCARD_H 32 | -------------------------------------------------------------------------------- /src/core/Settings/SettingCardGroup.cpp: -------------------------------------------------------------------------------- 1 | #include "SettingCardGroup.h" 2 | #include "Layout/ExpandLayout.h" 3 | #include "Common/StyleSheet.h" 4 | 5 | SettingCardGroup::SettingCardGroup(const QString &title, QWidget *parent) : QWidget(parent) 6 | { 7 | m_titleLabel = new QLabel(title, this); 8 | vBoxLayout = new QVBoxLayout(this); 9 | cardLayout = new ExpandLayout(); 10 | 11 | vBoxLayout->setContentsMargins(0, 0, 0, 0); 12 | vBoxLayout->setAlignment(Qt::AlignTop); 13 | vBoxLayout->setSpacing(0); 14 | cardLayout->setContentsMargins(0, 0, 0, 0); 15 | cardLayout->setSpacing(2); 16 | 17 | vBoxLayout->addWidget(m_titleLabel); 18 | vBoxLayout->addSpacing(12); 19 | vBoxLayout->addLayout(cardLayout, 1); 20 | 21 | FluentStyleSheet::apply("SETTING_CARD_GROUP", this); 22 | m_titleLabel->adjustSize(); 23 | } 24 | 25 | void SettingCardGroup::addSettingCard(QWidget *card) 26 | { 27 | card->setParent(this); 28 | cardLayout->addWidget(card); 29 | adjustSize(); 30 | } 31 | 32 | void SettingCardGroup::addSettingCards(const QList &cards) 33 | { 34 | for (auto c : cards) { 35 | addSettingCard(c); 36 | } 37 | } 38 | 39 | void SettingCardGroup::adjustSize() 40 | { 41 | int h = cardLayout->heightForWidth(this->width()) + 46; 42 | this->resize(this->width(), h); 43 | } 44 | -------------------------------------------------------------------------------- /src/core/Settings/SettingCardGroup.h: -------------------------------------------------------------------------------- 1 | #ifndef SETTINGCARDGROUP_H 2 | #define SETTINGCARDGROUP_H 3 | 4 | #include 5 | #include 6 | 7 | class ExpandLayout; 8 | 9 | class SettingCardGroup : public QWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit SettingCardGroup(const QString &title, QWidget *parent = nullptr); 14 | 15 | void addSettingCard(QWidget *card); 16 | void addSettingCards(const QList &cards); 17 | void adjustSize(); 18 | 19 | QVBoxLayout *vBoxLayout; 20 | ExpandLayout *cardLayout; 21 | 22 | signals: 23 | 24 | private: 25 | QLabel *m_titleLabel; 26 | }; 27 | 28 | #endif // SETTINGCARDGROUP_H 29 | -------------------------------------------------------------------------------- /src/core/Widgets/CheckBox.cpp: -------------------------------------------------------------------------------- 1 | #include "CheckBox.h" 2 | #include "Common/StyleSheet.h" 3 | 4 | CheckBox::CheckBox(const QString &text, QWidget *parent) : QCheckBox(text, parent) 5 | { 6 | FluentStyleSheet::apply("CHECK_BOX", this); 7 | } 8 | -------------------------------------------------------------------------------- /src/core/Widgets/CheckBox.h: -------------------------------------------------------------------------------- 1 | #ifndef CHECKBOX_H 2 | #define CHECKBOX_H 3 | 4 | #include 5 | 6 | class CheckBox : public QCheckBox 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit CheckBox(const QString &text, QWidget *parent = nullptr); 11 | 12 | signals: 13 | }; 14 | 15 | #endif // CHECKBOX_H 16 | -------------------------------------------------------------------------------- /src/core/Widgets/IconWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "IconWidget.h" 2 | 3 | #include 4 | 5 | IconWidget::IconWidget(FluentIconBase *ficon, QWidget *parent) : QWidget(parent), m_ficon(ficon) { } 6 | 7 | void IconWidget::setIcon(FluentIconBase *icon) 8 | { 9 | m_ficon.reset(icon); 10 | update(); 11 | } 12 | 13 | void IconWidget::paintEvent(QPaintEvent * /*event*/) 14 | { 15 | if (!m_ficon) { 16 | return; 17 | } 18 | QPainter painter(this); 19 | painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 20 | m_ficon->render(&painter, rect()); 21 | } 22 | -------------------------------------------------------------------------------- /src/core/Widgets/IconWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef ICONWIDGET_H 2 | #define ICONWIDGET_H 3 | 4 | #include 5 | #include "Common/Icon.h" 6 | 7 | class IconWidget : public QWidget 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit IconWidget(FluentIconBase *ficon, QWidget *parent = nullptr); 12 | 13 | void setIcon(FluentIconBase *icon); 14 | 15 | // QWidget interface 16 | protected: 17 | virtual void paintEvent(QPaintEvent *event) override; 18 | 19 | signals: 20 | 21 | private: 22 | QScopedPointer m_ficon; 23 | }; 24 | 25 | #endif // ICONWIDGET_H 26 | -------------------------------------------------------------------------------- /src/core/Widgets/Label.cpp: -------------------------------------------------------------------------------- 1 | #include "Label.h" 2 | 3 | #include 4 | 5 | PixmapLabel::PixmapLabel(QWidget *parent) : QLabel(parent), m_pixmap(QPixmap()) { } 6 | 7 | void PixmapLabel::setPixmap(const QPixmap &pixmap) 8 | { 9 | m_pixmap = pixmap; 10 | setFixedSize(pixmap.size()); 11 | update(); 12 | } 13 | 14 | QPixmap PixmapLabel::pixmap() const 15 | { 16 | return m_pixmap; 17 | } 18 | 19 | void PixmapLabel::paintEvent(QPaintEvent * /*event*/) 20 | { 21 | if (m_pixmap.isNull()) { 22 | return; 23 | } 24 | 25 | QPainter painter(this); 26 | painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 27 | painter.setPen(Qt::NoPen); 28 | painter.drawPixmap(rect(), m_pixmap); 29 | } 30 | -------------------------------------------------------------------------------- /src/core/Widgets/Label.h: -------------------------------------------------------------------------------- 1 | #ifndef LABEL_H 2 | #define LABEL_H 3 | 4 | #include 5 | 6 | class PixmapLabel : public QLabel 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit PixmapLabel(QWidget *parent = nullptr); 11 | 12 | void setPixmap(const QPixmap &pixmap); 13 | 14 | QPixmap pixmap() const; 15 | 16 | // QWidget interface 17 | protected: 18 | virtual void paintEvent(QPaintEvent *event) override; 19 | 20 | signals: 21 | 22 | private: 23 | QPixmap m_pixmap; 24 | }; 25 | 26 | #endif // LABEL_H 27 | -------------------------------------------------------------------------------- /src/core/Widgets/MultiSelectComboBox.h: -------------------------------------------------------------------------------- 1 | #ifndef MULTISELECTCOMBOBOX_H 2 | #define MULTISELECTCOMBOBOX_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class MultiSelectComboBox : public QComboBox 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit MultiSelectComboBox(QWidget *parent = nullptr); 13 | ~MultiSelectComboBox(); 14 | 15 | void addItem(const QString &text, const QVariant &userData); 16 | void addItem(const QIcon &icon, const QString &text, const QVariant &userData); 17 | void addItems(const QStringList &texts); 18 | 19 | QStringList currentText(); 20 | QList currentIndex(); 21 | void selectItemViewPress(QPoint pos); 22 | 23 | protected: 24 | bool eventFilter(QObject *watched, QEvent *event) override; 25 | void showPopup() override; 26 | void hidePopup() override; 27 | 28 | signals: 29 | 30 | private: 31 | QListView *selectItemView; 32 | QStandardItemModel *selectModel; 33 | QListView *popupView; 34 | QStandardItemModel *popupModel; 35 | bool isPermitHidePopup; 36 | }; 37 | 38 | #endif // MULTISELECTCOMBOBOX_H 39 | -------------------------------------------------------------------------------- /src/core/Widgets/Slider.h: -------------------------------------------------------------------------------- 1 | #ifndef SLIDER_H 2 | #define SLIDER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class Slider : public QSlider 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit Slider(Qt::Orientation orientation, QWidget *parent = nullptr); 13 | 14 | signals: 15 | void clicked(int); 16 | 17 | // QWidget interface 18 | protected: 19 | void mousePressEvent(QMouseEvent *event) override; 20 | }; 21 | 22 | /// Hollow handle style 23 | class HollowHandleStyle : public QProxyStyle 24 | { 25 | Q_OBJECT 26 | public: 27 | HollowHandleStyle(const QMap &cfg = QMap()); 28 | 29 | // QStyle interface 30 | public: 31 | void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, 32 | const QWidget *widget) const override; 33 | QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, 34 | const QWidget *widget) const override; 35 | 36 | private: 37 | QMap config; 38 | }; 39 | #endif // SLIDER_H 40 | -------------------------------------------------------------------------------- /src/core/Widgets/ThreeStateButton.h: -------------------------------------------------------------------------------- 1 | #ifndef THREESTATEBUTTON_H 2 | #define THREESTATEBUTTON_H 3 | 4 | #include 5 | #include 6 | 7 | enum ButtonState 8 | { 9 | NORMAL = 0, 10 | HOVER = 1, 11 | PRESSED = 2 12 | }; 13 | 14 | class ThreeStateButton : public QToolButton 15 | { 16 | Q_OBJECT 17 | public: 18 | explicit ThreeStateButton(const QMap &iconPaths, QWidget *parent = nullptr, 19 | const QSize &buttonSize = QSize(40, 40), const QSize &iconSize = QSize()); 20 | 21 | void setState(ButtonState state); 22 | 23 | // QObject interface 24 | public: 25 | virtual bool eventFilter(QObject *watched, QEvent *event) override; 26 | 27 | signals: 28 | 29 | private: 30 | QMap m_iconPaths; 31 | QSize m_buttonSize; 32 | QSize m_iconSize; 33 | }; 34 | 35 | #endif // THREESTATEBUTTON_H 36 | -------------------------------------------------------------------------------- /src/core/images/acrylic/noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/src/core/images/acrylic/noise.png -------------------------------------------------------------------------------- /src/core/images/check_box/Accept_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /src/core/images/check_box/Accept_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /src/core/images/check_box/PartialAccept_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /src/core/images/check_box/PartialAccept_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /src/core/images/color_dialog/Clear_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/core/images/color_dialog/Clear_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/core/images/color_dialog/HuePanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/src/core/images/color_dialog/HuePanel.png -------------------------------------------------------------------------------- /src/core/images/folder_list_dialog/Add_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/src/core/images/folder_list_dialog/Add_black.png -------------------------------------------------------------------------------- /src/core/images/folder_list_dialog/Add_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/src/core/images/folder_list_dialog/Add_white.png -------------------------------------------------------------------------------- /src/core/images/folder_list_dialog/Close_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/src/core/images/folder_list_dialog/Close_black.png -------------------------------------------------------------------------------- /src/core/images/folder_list_dialog/Close_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnigmaLauncher/QFluentWidgets/cd377e6f7f1fd9b32f971251e7400aa3afce9fbc/src/core/images/folder_list_dialog/Close_white.png -------------------------------------------------------------------------------- /src/core/images/icons/Accept_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Accept_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/CheckBox_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /src/core/images/icons/CheckBox_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /src/core/images/icons/ChevronDown_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /src/core/images/icons/ChevronDown_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/icons/ChevronRight_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/core/images/icons/ChevronRight_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/core/images/icons/Close_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/icons/Close_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/icons/Document_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Document_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Edit_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/core/images/icons/Edit_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/core/images/icons/GitHub_black.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/core/images/icons/GitHub_white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/core/images/icons/Heart_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Heart_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Mail_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/core/images/icons/Mail_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/core/images/icons/Menu_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/icons/Menu_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/icons/Pin_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Pin_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Return_black.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /src/core/images/icons/Return_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /src/core/images/icons/Scroll_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Scroll_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/SendFill_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/SendFill_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Send_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Send_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Unpin_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/icons/Unpin_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/info_bar/Info_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/info_bar/Info_light.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/info_bar/Success_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/info_bar/Success_light.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/core/images/info_bar/Warning_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/info_bar/Warning_light.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/core/images/spin_box/Down_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/spin_box/Down_white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/core/images/spin_box/Up_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/spin_box/Up_white.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/core/images/time_picker/Down_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/time_picker/Down_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/time_picker/Up_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/time_picker/Up_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/tree_view/TreeViewClose_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/tree_view/TreeViewClose_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/tree_view/TreeViewOpen_black.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/images/tree_view/TreeViewOpen_white.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/core/qss/dark/info_bar.qss: -------------------------------------------------------------------------------- 1 | InfoBar { 2 | border: 1px solid rgb(29, 29, 29); 3 | border-radius: 6px; 4 | background-color: rgb(39, 39, 39); 5 | } 6 | 7 | #titleLabel { 8 | font: 14px 'Segoe UI', 'Microsoft YaHei'; 9 | font-weight: bold; 10 | color: white; 11 | } 12 | 13 | #contentLabel { 14 | font: 14px 'Segoe UI', 'Microsoft YaHei'; 15 | color: white; 16 | } 17 | 18 | InfoBar[type="Info"] { 19 | background-color: rgb(39, 39, 39); 20 | } 21 | 22 | InfoBar[type="Success"] { 23 | background-color: rgb(57, 61, 27); 24 | } 25 | 26 | InfoBar[type="Warning"] { 27 | background-color: rgb(67, 53, 25); 28 | } 29 | 30 | InfoBar[type="Error"] { 31 | background-color: rgb(68, 39, 38); 32 | } 33 | 34 | InfoBarCloseButton { 35 | background-color: transparent; 36 | border-radius: 5px; 37 | } 38 | 39 | InfoBarCloseButton:hover { 40 | background-color: rgba(255, 255, 255, 9); 41 | } 42 | 43 | InfoBarCloseButton:pressed { 44 | background-color: rgba(255, 255, 255, 6); 45 | } -------------------------------------------------------------------------------- /src/core/qss/dark/message_dialog.qss: -------------------------------------------------------------------------------- 1 | QWidget { 2 | background-color: rgb(23, 23, 23); 3 | border: 1px solid rgb(55, 55, 55); 4 | } 5 | 6 | QWidget#windowMask { 7 | background-color: rgba(0, 0, 0, 0.6); 8 | border: none; 9 | } 10 | 11 | QLabel { 12 | background-color: transparent; 13 | color: white; 14 | font-family: 'Segoe UI', 'Microsoft YaHei'; 15 | border: none; 16 | } 17 | 18 | QLabel#titleLabel { 19 | font-size: 18px; 20 | } 21 | 22 | QLabel#contentLabel { 23 | font-size: 14px; 24 | } 25 | 26 | QPushButton { 27 | background-color: rgb(51, 51, 51); 28 | font: 15px 'Segoe UI', 'Microsoft YaHei'; 29 | border: transparent; 30 | color: white; 31 | } 32 | 33 | QPushButton:pressed:hover { 34 | background-color: rgb(102, 102, 102); 35 | } 36 | 37 | QPushButton:hover { 38 | background-color: rgb(35, 35, 35); 39 | } 40 | 41 | QPushButton:disabled { 42 | background-color: rgb(51, 51, 51); 43 | color: rgb(133, 133, 133); 44 | } -------------------------------------------------------------------------------- /src/core/qss/dark/navigation_interface.qss: -------------------------------------------------------------------------------- 1 | NavigationPanel[menu=true] { 2 | background-color: rgb(32, 32, 32); 3 | border: 1px solid rgb(57, 57, 57); 4 | border-top-right-radius: 7px; 5 | border-bottom-right-radius: 7px; 6 | } 7 | 8 | NavigationPanel[menu=false] { 9 | background-color: transparent; 10 | border: 1px solid transparent; 11 | border-top-right-radius: 7px; 12 | border-bottom-right-radius: 7px; 13 | } 14 | 15 | QScrollArea, 16 | #scrollWidget { 17 | border: none; 18 | background-color: transparent; 19 | } 20 | 21 | NavigationInterface { 22 | background-color: rgb(32, 32, 32); 23 | } -------------------------------------------------------------------------------- /src/core/qss/dark/setting_card_group.qss: -------------------------------------------------------------------------------- 1 | SettingCardGroup { 2 | background-color: transparent; 3 | } 4 | 5 | SettingCardGroup>QLabel { 6 | background-color: transparent; 7 | font: 20px 'Segoe UI', 'Microsoft YaHei'; 8 | color: white; 9 | border: none; 10 | } 11 | -------------------------------------------------------------------------------- /src/core/qss/dark/state_tool_tip.qss: -------------------------------------------------------------------------------- 1 | StateToolTip, 2 | ToastToolTip { 3 | background-color: --ThemeColorDark1; 4 | border: none; 5 | border-radius: 7px; 6 | } 7 | 8 | QLabel { 9 | color: black; 10 | background-color: transparent; 11 | font-family: 'Segoe UI', 'Microsoft YaHei'; 12 | border: none; 13 | } 14 | 15 | QLabel#titleLabel { 16 | font-size: 14px; 17 | } 18 | 19 | QLabel#contentLabel { 20 | font-size: 13px ; 21 | } -------------------------------------------------------------------------------- /src/core/qss/dark/tool_tip.qss: -------------------------------------------------------------------------------- 1 | ToolTip { 2 | border-radius: 4px; 3 | } 4 | 5 | ToolTip > #container { 6 | background-color: rgb(43, 43, 43); 7 | border: 1px solid rgb(28, 28, 28); 8 | border-radius: 4px; 9 | } 10 | 11 | QLabel { 12 | background-color: transparent; 13 | font: 12px 'Segoe UI', 'Microsoft YaHei'; 14 | color: white; 15 | border: none; 16 | } 17 | -------------------------------------------------------------------------------- /src/core/qss/light/info_bar.qss: -------------------------------------------------------------------------------- 1 | InfoBar { 2 | border: 1px solid rgb(229, 229, 229); 3 | border-radius: 6px; 4 | background-color: rgb(244, 244, 244); 5 | } 6 | 7 | #titleLabel { 8 | font: 14px 'Segoe UI', 'Microsoft YaHei'; 9 | font-weight: bold; 10 | color: black; 11 | } 12 | 13 | #contentLabel { 14 | font: 14px 'Segoe UI', 'Microsoft YaHei'; 15 | color: black; 16 | } 17 | 18 | InfoBar[type="Info"] { 19 | background-color: rgb(244, 244, 244); 20 | } 21 | 22 | InfoBar[type="Success"] { 23 | background-color: rgb(223, 246, 221); 24 | } 25 | 26 | InfoBar[type="Warning"] { 27 | background-color: rgb(255, 244, 206); 28 | } 29 | 30 | InfoBar[type="Error"] { 31 | background-color: rgb(253, 231, 233); 32 | } 33 | 34 | InfoBarCloseButton { 35 | background-color: transparent; 36 | border-radius: 5px; 37 | } 38 | 39 | InfoBarCloseButton:hover { 40 | background-color: rgba(0, 0, 0, 9); 41 | } 42 | 43 | InfoBarCloseButton:pressed { 44 | background-color: rgba(0, 0, 0, 6); 45 | } -------------------------------------------------------------------------------- /src/core/qss/light/message_dialog.qss: -------------------------------------------------------------------------------- 1 | QWidget { 2 | background-color: white; 3 | border: 1px solid rgb(200, 200, 200); 4 | } 5 | 6 | QWidget#windowMask { 7 | background-color: rgba(255, 255, 255, 0.6); 8 | border: none; 9 | } 10 | 11 | QLabel { 12 | background-color: transparent; 13 | color: black; 14 | font-family: 'Segoe UI', 'Microsoft YaHei'; 15 | border: none; 16 | } 17 | 18 | QLabel#titleLabel { 19 | font-size: 18px; 20 | } 21 | 22 | QLabel#contentLabel { 23 | font-size: 14px; 24 | } 25 | 26 | QPushButton { 27 | background-color: rgb(204, 204, 204); 28 | font: 15px 'Segoe UI', 'Microsoft YaHei'; 29 | border: transparent; 30 | } 31 | 32 | QPushButton:pressed:hover { 33 | background-color: rgb(153, 153, 153); 34 | } 35 | 36 | QPushButton:hover { 37 | background-color: rgb(230, 230, 230); 38 | } 39 | 40 | QPushButton:disabled { 41 | background-color: rgb(204, 204, 204); 42 | color: rgb(122, 122, 122); 43 | } -------------------------------------------------------------------------------- /src/core/qss/light/navigation_interface.qss: -------------------------------------------------------------------------------- 1 | NavigationPanel[menu=true] { 2 | background-color: rgb(243, 243, 243); 3 | border: 1px solid rgb(229, 229, 229); 4 | border-top-right-radius: 7px; 5 | border-bottom-right-radius: 7px; 6 | } 7 | 8 | NavigationPanel[menu=false] { 9 | background-color: transparent; 10 | border: 1px solid transparent; 11 | border-top-right-radius: 7px; 12 | border-bottom-right-radius: 7px; 13 | } 14 | 15 | QScrollArea, #scrollWidget { 16 | border: none; 17 | background-color: transparent; 18 | } 19 | 20 | NavigationInterface { 21 | background-color: rgb(243, 243, 243); 22 | } -------------------------------------------------------------------------------- /src/core/qss/light/setting_card_group.qss: -------------------------------------------------------------------------------- 1 | SettingCardGroup { 2 | background-color: transparent; 3 | } 4 | 5 | SettingCardGroup>QLabel { 6 | background-color: transparent; 7 | font: 20px 'Segoe UI', 'Microsoft YaHei'; 8 | color: black; 9 | border: none; 10 | } -------------------------------------------------------------------------------- /src/core/qss/light/state_tool_tip.qss: -------------------------------------------------------------------------------- 1 | StateToolTip, 2 | ToastToolTip { 3 | background-color: --ThemeColorDark1; 4 | border: none; 5 | border-radius: 7px; 6 | } 7 | 8 | QLabel { 9 | color: white; 10 | background-color: transparent; 11 | font-family: 'Segoe UI', 'Microsoft YaHei'; 12 | border: none; 13 | } 14 | 15 | QLabel#titleLabel { 16 | font-size: 14px; 17 | } 18 | 19 | QLabel#contentLabel { 20 | font-size: 13px; 21 | } -------------------------------------------------------------------------------- /src/core/qss/light/tool_tip.qss: -------------------------------------------------------------------------------- 1 | ToolTip { 2 | border-radius: 4px; 3 | } 4 | 5 | ToolTip > #container { 6 | border: 1px solid rgba(0, 0, 0, 0.06); 7 | background-color: rgb(243, 243, 243); 8 | border-radius: 4px; 9 | } 10 | 11 | 12 | QLabel { 13 | background-color: transparent; 14 | font: 12px 'Segoe UI', 'Microsoft YaHei'; 15 | border: none; 16 | color: black; 17 | } 18 | --------------------------------------------------------------------------------