Summary: Community version of Deepin‘s `Big Round Corners’ Official version of Small, Medium, Extra Large is here! . All windows have and taskbar has got right, small rounded, large rounded (0px, 8px, 18px). Attached is a detailed tutorial on how to modify the tutorial steps, and how to modify the rounded corners at any angle.


本文初发于 “偕臧的小站“,同步转载于此。

Translated from the original: Deepin 自定义修改窗口圆角大小


Some people want to stick to the big rounded corners, while others want to adjust the small rounded corners and right corners; personal experiences and living environment are different, so the citrus is different, so they have their own perspectives on the idea, and can appreciate each other!

The scope of DDE rounding modification is: **all main window rounding + Dock rounding + Menu rounding **.

This modification only involves the community Deepin has this feature (belongs to the community customization feature, is also a certain text and the community’s heart love ~ ).

UOS version is not enabled by default, of course, if you want to experience it, you can also change the size of the rounded corners by command (these kinds of features, for the time being, are out of the planning. I’m also afraid of being hammered by UOS‘s product managers and developers, and then reported as a bug single by the test ladies).

Because Deepin and UOS are actually two different forms of a product.


  • Chinese text: window rounded corner', small’, medium', large’
  • English text : Rounded Corner, small, medium, large

Large rounded corners (system original style): window = 18px; Medium rounded corners: window = 8px; Small rounded corners: window = 0px; For the internal (button, item background, etc.) rounded corners size, no change.

Well, this is also the design from the design department (she is beautiful too).

Modify rounded corner window ideas.

  1. First fork' the official repository to your own repository. To compile the project's dependencies, run sudo apt build-dep dtkgui, or go to the project root and run dpkg-checkbuilddeps` ;
  2. Modify the code and commit it in the format (important)
  3. After the test meets expectations, the code is submitted and awaits merging.

How this is achieved, modifying the place will involve designing three items in total.

  • dtkgui: Modify the basic rounded corner values and add an interface.
  • ddde-control-center: add control to change the rounded corner value of the software, international translation.
  • ddde-dock: Also change the rounded corner size of the dock in the taskbar in fashion mode.

Modify dtkgui code.

Add the corresponding interface first; make sure winID is created (otherwise a default window will be created), and then modify the value of the attribute, otherwise the dock will be grayed out, and the right-click menu will become opaque, which is a serious bug. Submit this modification with the following code.

Change code commit:

  1. commit a3b9836b // Add Modify Rounded Interface

  2. commit de1f742e // Fix default display as right angle.

  3. commit 6ae8f77d // Fix ToolTip’s rounded corners as 18px unsightly accidental bug

  4. commit ea60f6b0 // Optimization code

After running, replace the new header file and the resulting binary with the system to see the effect

☁  dtkgui [master]sudo rm -rf /usr/lib/x86_64-linux-gnu/
☁  dtkgui [master]sudo cp ~/project/build-dtkgui-unknown-Debug/src/ /usr/lib/x86_64-linux-gnu/
☁  dtkgui [master]sudo cp src/dplatformtheme.h /usr/include/libdtk-5.2.2/DGui

Modify de-control-center code.

Modify code to submit:

  1. commit a37aae15 // add controls Modify the value of the large round angle
  2. commit b9926d97 // Add the right application. International translation
  3. commit a6ea6be6 // fix layout Errors cause other controls to be compressed

Run it directly to see if there are any real-time effects.

Modify dode-dock code.

Change code commit:

  1. commit 89cf36ab // Dock taskbar modifying large rounded corners.
  2. commit 63953ef5 // Fix after logging out of reboot, dock The default display is right angle.

To run the compile and see the effect, you need to download the dconf-editor software, search for watchdog, and disable the dde-dock button, so that you can run the dock generated by the code instead of always displaying the system’s own taskbar dock.


Suddenly, a defect was reported by the upstairs test lady.

Since we only set this value in front end, every time we “logout, restart, turn off effects and then turn them back on”, we lose the value "DTK/windowRadius" QVariant(int, 8), which results in big rounded corners.

In the next stage, an assignment will be added to this value in a back-end piece to fix this flaw.

Customize the fillet size.

Mode 1.

Changes to “Control Center - Personalization - Rounded Window “** (available only for Deepin) via Interface Adjustment. Only right angle (0px), small rounded corner (8px), and large rounded corner (18px) are adjustable.

** Adjustable in three levels.

Mode 2.

Execute the command by commanding Terminal Adjustment, where the specific parameter 8 can be replaced with any number of angles, and takes effect for both Deepin and UOS.

# Manual adjustment of terminal values "DTK/windowRadius" QVariant(int, 8)
/usr/lib/x86_64-linux-gnu/libdtk-5.2.2/DGui/bin/deepin-gui-settings --set "DTK/WindowRadius" -i 8  // Rounding value setting
/usr/lib/x86_64-linux-gnu/libdtk-5.2.2/DGui/bin/deepin-gui-settings    // View Fillet Values

PS: If there is no such program running in this path, you need to execute the: sudo apt install libdtkgui5-bin

End result.

No picture. No picture. Say a 🔨:

Let’s start with the final realization.

#Breakdown summary~.

This time the function is very small, but it is the community users have always wanted the function, submit a lot this time. The first is to be tested by the test lady, the second is to adhere to a commit to do only one thing. Third, to participate in the community to contribute to the partners, a submission demonstration, showing how to submit from github pr and then be merged into the main code flow. Fourthly, share your own details and happiness.

For any piece of software, I personally feel that it should be to uphold the ** “people-oriented “** point of view. ** a product should have temperature **, in some details of the place with the care of the user, rather than knowledge of a cold device. Not a little emotion, although the need to be able to use, but do not use the discarded, and then never thought of. Life is short, have to do a little interesting things. Always do my best to add a thought in it. I’m not sure how much I’ll be able to do.

Participate together in contributing to.

If you are interested, you can also add some new features to it and merge it directly into the upstream Deepin mainline code. The source code can be downloaded directly from linuxdeepin and is synchronized with the intranet code in real time. For DTK, in addition to the source code comments, you can also read the DTK API web page (currently updated daily). If you want more people to experience the effect of your code, just submit pr and remember to refer to this Commit Submission Specification for submission specifications. Commit%E6%8F%90%E4%BA%A4%E8%A7%84%E8%8C%83) Oh. See you next~~.

If you want to be merged quickly, attach some suggestions:

  1. for porting to other distributions, bug fixes, such contributions pr are easy and fast to merge;
  2. for some community customization features, it is recommended to set them to take effect only on community Deepin, and to disable them by default on UOS to speed up the merge process. 3. for some new features and functions, if they are needed in the UOS version or are in the planning stage, it is recommended to set them to take effect only on community Deepin;
  3. for some new features and functions, if they are required by the UOS version or are in the planning stage, they can also be merged quickly; 4. for individuals and from the community, it is recommended to set it to work only on community Deepin;
  4. for individuals and rounds from the community, it is also easy to merge, with communication that the community is looking forward to it (less strict rules and processes than the commercial line). 5;
  5. to test as fully and completely as possible before submitting.
  6. Be sure to pay attention to the Commit Submission Specification;
  7. you can communicate in the community bbs forum or github to remind the

In addition, the following interface classes [dsysinfo.h]( dsysinfo.h), and write a detailed tutorial sometime, distinguishing between the various versions of the system.

QString DSysInfo::uosEditionName(const QLocale &locale) // Get the version name, for example, "Professional"/"Home"/"Community"....

enum UosEdition {
    UosProfessional,  //专业版
    UosHome,         //个人版
    UosCommunity,    //社区版
    UosEuler,        // 欧拉版
    UosMilitaryS,    // for Server

    UosEditionCount // must at last

// The following interface is not recommended, as it will be removed later.

    enum ProductType {
        UnknownType = 0,

    enum DeepinType {
        UnknownDeepin = 0,

Updated: 2020-11-16

However, due to various factors such as release schedule, expected release strategy, overall rush, allowing time for testing, and coordinating with other project developers and working together, it is not possible to schedule the fixes immediately once they are applied and see the effect.

Fix the bug that the default transparency module is compressed due to a layout error in Control Center and Modify Window with Rounded Corners:

Fix after logging out/restarting, the right corner of the taskbar and active window becomes rounded and the state cannot be saved.

  • This part of the change concerns backend support:
  • This part of the revision concerns front-end support:


The method is to modify the value of a dtkgui item, then regenerate the corresponding binary and replace it in the system directory; although it works for the time being, it is not standardized, and it will fail after reboot or logout. It doesn’t feel so simple and elegant;**

I’m just saying it’s working. Who’s to say they haven’t done it yet? The enthusiastic techies who can’t wait to get started will have to find a way to make it work, and we’ll see what we can achieve first.

But as a formal change, it must not be treated in the same way, it has to conform to a dtk style, user-friendly, functional and product design planning must not conflict, interface changes must be standardized, and the interface must be kept backward compatible.

It is important that the interface is standardized and kept backwards compatible.

I thought I was modifying a simple feature, but it would end up involving so many items I didn’t expect: dde-daemon, startdde, deepin-desktop-schemas, dde-control-center, dtkgui, `dde-dock There are a total of 6 of them, many of them are very important core base libraries, if you modify them, it will affect many other projects, so it is more careful and cautious to modify them. But I’m happy to add this feature to the community at last.
It’s a good thing that we have a lot of people working on this;

Series Address.


Welcome to the star and fork series of QT / DTK learnings, with a table of contents for learning the ins and outs.