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