-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add some interfaces about personalization #258
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: FeiWang1119 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
deepin pr auto review |
include/kernel/dplatforminterface.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
先不要作为public接口,先作为private的,不对外可见
include/kernel/dplatforminterface.h
Outdated
virtual int windowRadius() const; | ||
virtual void setWindowRadius(int windowRadius); | ||
virtual QByteArray fontName() const; | ||
virtual void setFontName(const QByteArray &fontName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种系统全局类的配置的修改不在 dtkgui 里提供,dtkgui里只读,不实现修改的功能。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
就算要做修改的功能,也应该是在 dtksystemsettings 模块里做。
include/kernel/dplatforminterface.h
Outdated
virtual ~DPlatformInterface(); | ||
|
||
virtual int windowRadius() const; | ||
virtual void setWindowRadius(int windowRadius); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果是针对某个窗口的,那可以留着设置接口
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
作为一个单独的cmake模块放到一个子目录里,目录以 plugins/platform 开头,比如是 plugins/platform/xcb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同样的也应该是 private 的,不对外
src/kernel/dplatformhandle.cpp
Outdated
if (contextWindow->noTitlebar() == enable) | ||
return true; | ||
contextWindow->setNoTitlebar(enable); | ||
#ifndef DTK_DISABLE_TREELAND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分为什么没有拆到 DPlatformHandle 里去?
src/kernel/dplatformhandle.cpp
Outdated
@@ -1209,6 +1203,12 @@ WId DPlatformHandle::windowLeader() | |||
|
|||
void DPlatformHandle::setWindowRadius(int windowRadius) | |||
{ | |||
#ifndef DTK_DISABLE_TREELAND | |||
if (DGuiApplicationHelper::testAttribute(DGuiApplicationHelper::IsTreelandPlatform)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
src/kernel/dplatforminterface.cpp
Outdated
{ | ||
} | ||
|
||
int DPlatformInterface::windowRadius() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以直接是纯虚函数
src/kernel/dplatformtheme.cpp
Outdated
@@ -19,7 +26,6 @@ DGUI_BEGIN_NAMESPACE | |||
DPlatformThemePrivate::DPlatformThemePrivate(Dtk::Gui::DPlatformTheme *qq) | |||
: DNativeSettingsPrivate(qq, QByteArrayLiteral("/deepin/palette")) | |||
{ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥删了
: QWaylandClientExtensionTemplate<PersonalizationManager>(1) | ||
{ | ||
if (QGuiApplication::platformName() == QLatin1String("wayland")) { | ||
QtWaylandClient::QWaylandIntegration *waylandIntegration = static_cast<QtWaylandClient::QWaylandIntegration *>(QGuiApplicationPrivate::platformIntegration()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qt6版本不是这样使用了吧,它不是有了 QNativeInterface 这种东西
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
TAG Bot New tag: 5.7.1 |
TAG Bot New tag: 5.7.2 |
TAG Bot New tag: 5.7.3 |
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
add window platform interface Log: as title.
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#258
add some interfaces about personalization
Log: