ui: avoid explicitly setting stylesheets
This commit is contained in:
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Uyanide pywang0608@foxmail.com
|
* @Author: Uyanide pywang0608@foxmail.com
|
||||||
* @Date: 2025-08-05 01:34:52
|
* @Date: 2025-08-05 01:34:52
|
||||||
* @LastEditTime: 2025-08-07 22:28:11
|
* @LastEditTime: 2025-08-07 23:24:02
|
||||||
* @Description: Configuration manager.
|
* @Description: Configuration manager.
|
||||||
*/
|
*/
|
||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_H
|
||||||
@@ -16,10 +16,10 @@ class Config : public QObject {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
enum class SortType : int {
|
enum class SortType : int {
|
||||||
None = 0,
|
None = 0, // "none"
|
||||||
Name,
|
Name, // "name"
|
||||||
Date,
|
Date, // "date"
|
||||||
Size,
|
Size, // "size"
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WallpaperConfigItems {
|
struct WallpaperConfigItems {
|
||||||
|
|||||||
@@ -22,9 +22,6 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="ImagesCarouselScrollArea" name="scrollArea">
|
<widget class="ImagesCarouselScrollArea" name="scrollArea">
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">border: none</string>
|
|
||||||
</property>
|
|
||||||
<property name="verticalScrollBarPolicy">
|
<property name="verticalScrollBarPolicy">
|
||||||
<enum>Qt::ScrollBarPolicy::ScrollBarAlwaysOff</enum>
|
<enum>Qt::ScrollBarPolicy::ScrollBarAlwaysOff</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -36,8 +33,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>382</width>
|
<width>380</width>
|
||||||
<height>282</height>
|
<height>280</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
|
<layout class="QHBoxLayout" name="horizontalLayout_2"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Uyanide pywang0608@foxmail.com
|
* @Author: Uyanide pywang0608@foxmail.com
|
||||||
* @Date: 2025-08-05 01:22:53
|
* @Date: 2025-08-05 01:22:53
|
||||||
* @LastEditTime: 2025-08-07 22:17:41
|
* @LastEditTime: 2025-08-08 00:43:47
|
||||||
* @Description: Animated carousel widget for displaying and selecting images.
|
* @Description: Animated carousel widget for displaying and selecting images.
|
||||||
*/
|
*/
|
||||||
#include "images_carousel.h"
|
#include "images_carousel.h"
|
||||||
@@ -38,9 +38,11 @@ ImagesCarousel::ImagesCarousel(const Config::StyleConfigItems& styleConfig,
|
|||||||
m_sortReverse(sortConfig.reverse) {
|
m_sortReverse(sortConfig.reverse) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
m_scrollArea = dynamic_cast<ImagesCarouselScrollArea*>(ui->scrollArea);
|
m_scrollArea = dynamic_cast<ImagesCarouselScrollArea*>(ui->scrollArea);
|
||||||
|
|
||||||
m_imagesLayout = dynamic_cast<QHBoxLayout*>(ui->scrollAreaWidgetContents->layout());
|
m_imagesLayout = dynamic_cast<QHBoxLayout*>(ui->scrollAreaWidgetContents->layout());
|
||||||
|
|
||||||
|
// Remove border
|
||||||
|
ui->scrollArea->setFrameShape(QFrame::NoFrame);
|
||||||
|
|
||||||
// Load initial images
|
// Load initial images
|
||||||
connect(this,
|
connect(this,
|
||||||
&ImagesCarousel::loadingCompleted,
|
&ImagesCarousel::loadingCompleted,
|
||||||
|
|||||||
Reference in New Issue
Block a user