mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-20 03:01:36 +08:00
优化 UI细节
This commit is contained in:
@@ -24,8 +24,8 @@ void image_show::setImage(QPixmap image)
|
|||||||
// QPainter painter(&screen0);
|
// QPainter painter(&screen0);
|
||||||
QImage re_screen1;
|
QImage re_screen1;
|
||||||
QImage re_screen0=screen0.scaled(QSize(400,300),Qt::KeepAspectRatio,Qt::SmoothTransformation);
|
QImage re_screen0=screen0.scaled(QSize(400,300),Qt::KeepAspectRatio,Qt::SmoothTransformation);
|
||||||
int desktop_w=DApplication::desktop()->width();
|
desktop_w=DApplication::desktop()->width();
|
||||||
int desktop_h=DApplication::desktop()->height();
|
desktop_h=DApplication::desktop()->height();
|
||||||
if(screen0.width()>(desktop_w-20) || screen0.height()>(desktop_h-20)){
|
if(screen0.width()>(desktop_w-20) || screen0.height()>(desktop_h-20)){
|
||||||
re_screen1=screen0.scaled(QSize(desktop_w-20,desktop_h-20),Qt::KeepAspectRatio,Qt::SmoothTransformation);
|
re_screen1=screen0.scaled(QSize(desktop_w-20,desktop_h-20),Qt::KeepAspectRatio,Qt::SmoothTransformation);
|
||||||
m_image=QPixmap::fromImage(re_screen1);
|
m_image=QPixmap::fromImage(re_screen1);
|
||||||
@@ -40,6 +40,8 @@ void image_show::mousePressEvent(QMouseEvent *)
|
|||||||
{
|
{
|
||||||
m_dialog->setimage(m_image);
|
m_dialog->setimage(m_image);
|
||||||
m_dialog->showFullScreen();
|
m_dialog->showFullScreen();
|
||||||
moveToCenter(m_dialog);
|
m_dialog->setFixedSize(desktop_w,desktop_h);
|
||||||
|
m_dialog->move(0,0);/*
|
||||||
|
moveToCenter(m_dialog);*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ public:
|
|||||||
explicit image_show(QWidget *parent = nullptr);
|
explicit image_show(QWidget *parent = nullptr);
|
||||||
|
|
||||||
void setImage(QPixmap);
|
void setImage(QPixmap);
|
||||||
|
int desktop_w;
|
||||||
|
int desktop_h;
|
||||||
private:
|
private:
|
||||||
QLabel *m_label=new QLabel;
|
QLabel *m_label=new QLabel;
|
||||||
QPixmap m_image;
|
QPixmap m_image;
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ Widget::~Widget()
|
|||||||
void Widget::initUI()
|
void Widget::initUI()
|
||||||
{
|
{
|
||||||
//ui初始化
|
//ui初始化
|
||||||
setMaskAlpha(230);
|
setMaskAlpha(220);
|
||||||
ui->webfoot->setFixedHeight(0);
|
ui->webfoot->setFixedHeight(0);
|
||||||
ui->stackedWidget->setCurrentIndex(0);
|
ui->stackedWidget->setCurrentIndex(0);
|
||||||
ui->listWidget->hide();
|
ui->listWidget->hide();
|
||||||
@@ -119,7 +119,7 @@ void Widget::initUI()
|
|||||||
ui->pushButton_uninstall->hide();
|
ui->pushButton_uninstall->hide();
|
||||||
ui->line1_widget->setStyleSheet("background-color:#808080");
|
ui->line1_widget->setStyleSheet("background-color:#808080");
|
||||||
ui->icon->setPixmap(QIcon::fromTheme("spark-store").pixmap(36,36));
|
ui->icon->setPixmap(QIcon::fromTheme("spark-store").pixmap(36,36));
|
||||||
ui->titlebar->setFixedHeight(48);
|
ui->titlebar->setFixedHeight(50);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ void Widget::initUI()
|
|||||||
QWidget *w_titlebar=new QWidget;
|
QWidget *w_titlebar=new QWidget;
|
||||||
QHBoxLayout *ly_titlebar=new QHBoxLayout;
|
QHBoxLayout *ly_titlebar=new QHBoxLayout;
|
||||||
w_titlebar->setLayout(ly_titlebar);
|
w_titlebar->setLayout(ly_titlebar);
|
||||||
ly_titlebar->addWidget(ui->pushButton_return);
|
// ly_titlebar->addWidget(ui->pushButton_return);
|
||||||
ly_titlebar->addStretch();
|
ly_titlebar->addStretch();
|
||||||
ly_titlebar->addSpacing(50);
|
ly_titlebar->addSpacing(50);
|
||||||
ly_titlebar->addWidget(searchEdit);
|
ly_titlebar->addWidget(searchEdit);
|
||||||
|
|||||||
233
widget.ui
233
widget.ui
@@ -54,17 +54,49 @@
|
|||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_24">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
<property name="spacing">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item row="6" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_video">
|
||||||
|
<property name="text">
|
||||||
|
<string>视频播放</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="16" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_download">
|
||||||
|
<property name="text">
|
||||||
|
<string>下载列表</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_system">
|
||||||
|
<property name="text">
|
||||||
|
<string>系统工具</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_theme">
|
||||||
|
<property name="text">
|
||||||
|
<string>主题美化</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_music">
|
||||||
|
<property name="text">
|
||||||
|
<string>音乐欣赏</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="icon">
|
<widget class="QLabel" name="icon">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -83,7 +115,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="0">
|
||||||
<spacer name="verticalSpacer_7">
|
<spacer name="verticalSpacer_7">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@@ -99,7 +131,81 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="4">
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>3</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QPushButton" name="pushButton_return">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="icons.qrc">
|
||||||
|
<normaloff>:/icons/icons/category_active.svg</normaloff>:/icons/icons/category_active.svg</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_dev">
|
||||||
|
<property name="text">
|
||||||
|
<string>编程开发</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_office">
|
||||||
|
<property name="text">
|
||||||
|
<string>办公学习</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_read">
|
||||||
|
<property name="text">
|
||||||
|
<string>阅读翻译</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="0" colspan="5">
|
||||||
|
<widget class="QPushButton" name="menu_other">
|
||||||
|
<property name="text">
|
||||||
|
<string>其他应用</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="5">
|
||||||
<widget class="QPushButton" name="menu_main">
|
<widget class="QPushButton" name="menu_main">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
@@ -109,91 +215,35 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="7" column="0" colspan="5">
|
||||||
<widget class="QPushButton" name="menu_network">
|
|
||||||
<property name="text">
|
|
||||||
<string>网络应用</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="menu_chat">
|
|
||||||
<property name="text">
|
|
||||||
<string>社交沟通</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="menu_music">
|
|
||||||
<property name="text">
|
|
||||||
<string>音乐欣赏</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="menu_video">
|
|
||||||
<property name="text">
|
|
||||||
<string>视频播放</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="menu_photo">
|
<widget class="QPushButton" name="menu_photo">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>图形图像</string>
|
<string>图形图像</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="8" column="0" colspan="5">
|
||||||
<widget class="QPushButton" name="menu_game">
|
<widget class="QPushButton" name="menu_game">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>游戏娱乐</string>
|
<string>游戏娱乐</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="4" column="0" colspan="5">
|
||||||
<widget class="QPushButton" name="menu_office">
|
<widget class="QPushButton" name="menu_chat">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>办公学习</string>
|
<string>社交沟通</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="3" column="0" colspan="5">
|
||||||
<widget class="QPushButton" name="menu_read">
|
<widget class="QPushButton" name="menu_network">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>阅读翻译</string>
|
<string>网络应用</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="15" column="0" colspan="5">
|
||||||
<widget class="QPushButton" name="menu_dev">
|
|
||||||
<property name="text">
|
|
||||||
<string>编程开发</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="menu_system">
|
|
||||||
<property name="text">
|
|
||||||
<string>系统工具</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="menu_theme">
|
|
||||||
<property name="text">
|
|
||||||
<string>主题美化</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="menu_other">
|
|
||||||
<property name="text">
|
|
||||||
<string>其他应用</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="line1_widget" native="true">
|
<widget class="QWidget" name="line1_widget" native="true">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -212,22 +262,15 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="2">
|
||||||
<widget class="QPushButton" name="menu_download">
|
<spacer name="horizontalSpacer_9">
|
||||||
<property name="text">
|
|
||||||
<string>下载列表</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>40</width>
|
||||||
<height>40</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@@ -627,10 +670,13 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>901</width>
|
<width>901</width>
|
||||||
<height>864</height>
|
<height>849</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_17">
|
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_3" native="true">
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@@ -640,23 +686,6 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QPushButton" name="pushButton_return">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="icons.qrc">
|
|
||||||
<normaloff>:/icons/icons/category_active.svg</normaloff>:/icons/icons/category_active.svg</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
<item row="2" column="2">
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|||||||
Reference in New Issue
Block a user