[Share Experiences] 一个方便修改GTK应用标题栏高度的脚本
Tofloor
poster avatar
DebuggerX
deepin
2023-04-18 19:06
Author

应许多用户的反馈,20.9更新了GTK应用标题栏的高度,从原本的40px改成了24px,但在我的机器上非常难看:

截图_选择区域_20230418105114.png

相比系统DTK应用的标题栏,显得格外小气局促,操作按钮也很难点到。

搜到修改GTK标题栏高度的办法:https://bbs.deepin.org/zh/post/234783

我把操作写成了脚本:

#!/usr/bin/env bash

HEIGHT=$1

function set_height() {
  MODE=$1
  if [ -f ~/.local/share/deepin/themes/deepin/"$MODE"/titlebar.ini ]; then
    sed -i "s/height=[0-9]\?\+/height=$HEIGHT/" ~/.local/share/deepin/themes/deepin/"$MODE"/titlebar.ini
  else
    mkdir -p ~/.local/share/deepin/themes/deepin/"$MODE"/
    touch ~/.local/share/deepin/themes/deepin/"$MODE"/titlebar.ini
    cat >>~/.local/share/deepin/themes/deepin/"$MODE"/titlebar.ini <

将上面的内容保存为shell脚本文件,如 gtk_headerbar_height.sh 然后执行:

bash gtk_headerbar_height.sh 40

即可设置标题栏高度为40px,效果:

截图_选择区域_20230418105243.png

Reply Favorite View the author
All Replies
liwl
deepin
2023-04-18 19:08
#1

所以额头问题,永远是个争论不朽的,有人喜欢有人厌

Reply View the author
世界和平
deepin
2023-04-18 19:22
#2

见仁见智,你不说,我都没发现有变化

相对于浏览器的大额头(比如火狐那种),可能大家会比较在意,但对于文件管理器,可能留意程度就低很多了

Reply View the author
朔妈图财
deepin
2023-04-18 19:42
#3

我没发现啊,一会特意观察下去

Reply View the author
Tonny
deepin
2023-04-18 20:44
#4
It has been deleted!
神末shenmo
Moderator
Spark-App
2023-04-19 06:20
#5
Tonny It has been deleted!

这个是什么桌面啊,看起来挺像deepin,又比23好看

Reply View the author
DebuggerX
deepin
2023-04-19 06:52
#6
神末shenmo

这个是什么桌面啊,看起来挺像deepin,又比23好看

一眼KDE

Reply View the author
zccrs
deepin
2023-04-20 23:08
#7

😂 宽度会改回40px。不过高度真的还是众口难调的问题,改之前这几年经常看到有人喷额头大,改低了之后又有人觉得变丑了。

Reply View the author
ChenX
deepin
2023-04-24 22:09
#8

要吗要选择24和40??30就刚好,有点用deepin15的感觉,但是dde系列软件还是出奇的的宽大丑,适中就行,实在不行设置安排上,自定义,

Reply View the author
神末shenmo
Moderator
Spark-App
2023-04-28 04:47
#9
zccrs

😂 宽度会改回40px。不过高度真的还是众口难调的问题,改之前这几年经常看到有人喷额头大,改低了之后又有人觉得变丑了。

这有点矫枉过正了

再说,23不是更大吗,应该逐渐过渡过去才对吧

Reply View the author
reeingal
deepin
2023-05-11 01:12
#10

众口难调那就提供个设置项让用户自己设置就是了。一刀切真无语

Reply View the author