Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
michael19911108 authored Sep 28, 2023
2 parents 30cfea9 + 14297fe commit 9635f0a
Show file tree
Hide file tree
Showing 31 changed files with 294 additions and 180 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/backup-to-gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ concurrency:
jobs:
backup-to-gitlabwh:
uses: linuxdeepin/.github/.github/workflows/backup-to-gitlabwh.yml@master
secrets:
BRIDGETOKEN: ${{ secrets.BRIDGETOKEN }}
secrets: inherit

backup-to-gitee:
uses: linuxdeepin/.github/.github/workflows/backup-to-gitee.yml@master
secrets:
GITEE_SYNC_TOKEN: ${{ secrets.GITEE_SYNC_TOKEN }}
secrets: inherit
6 changes: 1 addition & 5 deletions .github/workflows/call-build-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@ on:
jobs:
check_job:
uses: linuxdeepin/.github/.github/workflows/build-distribution.yml@master
secrets:
BUILD_GPG_PRIVATE_KEY: ${{ secrets.BUILD_GPG_PRIVATE_KEY }}
BUILD_SSH_PRIVATE_KEY: ${{ secrets.BUILD_SSH_PRIVATE_KEY }}
WEBDAV_PASSWD: ${{ secrets.WEBDAV_PASSWD }}
WEBDAV_USER: ${{ secrets.WEBDAV_USER }}
secrets: inherit
3 changes: 1 addition & 2 deletions .github/workflows/call-clacheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ concurrency:
jobs:
clacheck:
uses: linuxdeepin/.github/.github/workflows/cla-check.yml@master
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- run: export
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
Expand Down
2 changes: 2 additions & 0 deletions .tx/deepin.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[transifex]
branch = m20
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ cmake_minimum_required(VERSION 3.1.0)

#工程名
project(downloader)
set(PROJECT_VERSION "5.3.70")
if (CVERSION)
message("CVERSION: ${CVERSION}")
set(PROJECT_VERSION ${CVERSION})
else ()
set(PROJECT_VERSION "5.3.70")
endif ()
set(PROJECT_VERSION_MAJOR 5)
set(QT_MIN_VERSION "5.11.0")
set(DLM_NAME "downloader")
Expand Down Expand Up @@ -68,8 +73,9 @@ set(QT Core Gui Widgets Network DBus Sql LinguistTools Svg Test WebChannel WebSo
find_package(Qt5 COMPONENTS ${QT} REQUIRED)

#应用DTK库
set(DTK Widget Core Gui)
find_package(Dtk COMPONENTS ${DTK} REQUIRED)
find_package(DtkWidget REQUIRED)
find_package(DtkCore REQUIRED)
find_package(DtkGui REQUIRED)

#安装
# qm files.
Expand Down Expand Up @@ -97,7 +103,9 @@ install(FILES data/downloader.svg DESTINATION share/downloader/icons/logo/)
# 添加子模块test
add_subdirectory(src)
add_subdirectory(translations)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_subdirectory(tests)
endif()

install(TARGETS downloader dlmlog dlmdatabase dlmaria2 dlmcontrolui
RUNTIME DESTINATION bin
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Download Manager is Deepin Desktop Environment download manager.

2. Build:
```
$ cd downloadmanager
$ cd deepin-downloader
$ mkdir Build
$ cd Build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ..
Expand Down
2 changes: 1 addition & 1 deletion README.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

2. Build:
```
$ cd downloadmanager
$ cd deepin-downloader
$ mkdir Build
$ cd Build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ..
Expand Down
18 changes: 18 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
deepin-downloader (5.3.75) stable; urgency=medium

* changelog 5.3.75

-- muyuankai <[email protected]> Mon, 25 Sep 2023 16:57:38 +0800

deepin-downloader (5.3.74) stable; urgency=medium

* update changelog 5.3.74.

-- wangcong <[email protected]> Mon, 30 Aug 2023 16:39:01 +0800

deepin-downloader (5.3.73) stable; urgency=medium

* merge gerrit dev.

-- muyuankai <[email protected]> Mon, 24 Jul 2023 16:00:01 +0800

downloadmanager (5.3.70) stable; urgency=medium

* 升级版本到5.3.70.
Expand Down
7 changes: 3 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Source: downloadmanager
Source: deepin-downloader
Section: utils
Priority: optional
Maintainer: Deepin Packages Builder <[email protected]>
Build-Depends:
Build-Depends:
debhelper (>= 12),
cmake,
pkg-config,
Expand All @@ -25,8 +25,7 @@ Homepage: https://www.deepin.org/

Package: org.deepin.downloader
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libdlmaria2,
libdlmcontrolui, libdlmdatabase, libdlmlog, libglib2.0-bin, dde-application-manager
Depends: ${shlibs:Depends}, ${misc:Depends}, libdlmaria2, libdlmcontrolui, libdlmdatabase, libdlmlog
Description: it's a user-friendly download manager, supporting URLs and torrent files.
downloader for deepin desktop environment.

Expand Down
4 changes: 3 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/make -f

export QT_SELECT=qt5
include /usr/share/dpkg/default.mk


%:
dh $@
Expand All @@ -13,4 +15,4 @@ override_dh_auto_configure:
-DUSE_AM_DBUS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DAPP_VERSION=$(DEB_VERSION_UPSTREAM) -DVERSION=$(DEB_VERSION_UPSTREAM) LIB_INSTALL_DIR=/usr/lib
-DAPP_VERSION=$(DEB_VERSION_UPSTREAM) -DCVERSION=$(DEB_VERSION_UPSTREAM) LIB_INSTALL_DIR=/usr/lib
4 changes: 2 additions & 2 deletions rpm/downloader.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%global repo downloadmanager
%global repo deepin-downloader

%define pkgrelease 1
%if 0%{?openeuler}
Expand All @@ -13,7 +13,7 @@ Release: 1%{pkgrelease}
Summary: a user-friendly download tool, supporting URLs and torrent files
License: GPLv3+
URL: https://github.com/linuxdeepin/org.deepin.downloader
Source0: downloadmanager_%{version}.orig.tar.gz
Source0: deepin-downloader_%{version}.orig.tar.gz

BuildRequires: gcc-c++
BuildRequires: cmake
Expand Down
3 changes: 3 additions & 0 deletions src/include/ui/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
#include <QStyleOptionViewItem>
#include <QApplication>
namespace Global {
const int tableView_NormalMode_Width = 48;
const int tableView_CompactMode_Width = 36;
const float compactMode_ratio = (2.f/3);

const QString ACTIVE = QObject::tr("Downloading");
const QString WAITING = QObject::tr("Waiting");
Expand Down
6 changes: 3 additions & 3 deletions src/src/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ target_link_libraries(dlmcontrolui
dlmlog
dlmaria2
dlmdatabase
Dtk::Core
Dtk::Widget
Dtk::Gui
${DtkCore_LIBRARIES}
${DtkWidget_LIBRARIES}
${DtkGui_LIBRARIES}
Qt5::Core
Qt5::Network
Qt5::Widgets
Expand Down
7 changes: 3 additions & 4 deletions src/src/ui/createTask/btinfodelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ void BtInfoDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option
painter->restore();
painter->save();
QFont font;
font.setPointSize(10);
painter->setFont(font);

if (index.column() == 0) {
Expand All @@ -99,15 +98,15 @@ void BtInfoDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option
icon = prov.icon(QFileIconProvider::File);
}
QPixmap pic = icon.pixmap(20, 20);
painter->drawPixmap(option.rect.x() + 32, option.rect.y() + 13, pic);
painter->drawPixmap(option.rect.x() + 32, option.rect.y() + (option.rect.height() - 20)/2, pic);

painter->setPen(Qt::darkGray);
QString text = painter->fontMetrics().elidedText(index.model()->data(index.model()->index(index.row(), 1)).toString(), Qt::ElideRight, option.rect.width() - 55);
painter->drawText(option.rect.x() + 55, option.rect.y() + 28, text);
painter->drawText(option.rect.marginsRemoved(QMargins(55, 2, 0, 2)), Qt::AlignVCenter | Qt::AlignLeft, text);
} else {
painter->setPen(Qt::darkGray);
QString text = painter->fontMetrics().elidedText(index.data().toString(), Qt::ElideRight, option.rect.width() - 25);
painter->drawText(option.rect.x() + 5, option.rect.y() + 28, text);
painter->drawText(option.rect.marginsRemoved(QMargins(5, 2, 0, 2)), Qt::AlignVCenter | Qt::AlignLeft, text);
}
painter->restore();
}
Expand Down
Loading

0 comments on commit 9635f0a

Please sign in to comment.