How to get in LM 21 Cinnamon all four window corners rounded

Style your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
senjoz
Level 5
Level 5
Posts: 889
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

How to get in LM 21 Cinnamon all four window corners rounded

Post by senjoz »

I like rounded window corners. To get all four window corners rounded in LM 20.3 Cinnamon (for most default applications) I adapted file /usr/share/themes/Mint-X/metacity-1/metacity-theme-3.xml.
metacity-theme-3.xml.tar.gz
(3.06 KiB) Downloaded 26 times
round_corners.png

LM 21 Cinnamon does not use the metacity theme anymore. I would like to have all four window corners rounded also in LM 21 Cinnamon. I cannot find out how to adapt gtk.css files for gtk 2-3-4 in Mint-X theme to get rounded corners. Can somebody here give me some hints about that?

Regards, Jože



Code: Select all

~$ inxi -Fxxxrz
System:
  Kernel: 5.15.0-46-generic arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    Desktop: Cinnamon v: 5.4.10 tk: GTK v: 3.24.33 wm: Mutter vt: 7 dm: LightDM
    v: 1.30.0 Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: FUJITSU product: LIFEBOOK U727 v: 10601736746
    serial: <superuser required> Chassis: type: 10 v: LIFEBOOK U727
    serial: <superuser required>
  Mobo: FUJITSU model: FJNB2A5 v: E4 serial: <superuser required>
    UEFI: FUJITSU // Insyde v: Version 1.28 date: 08/06/2021
Battery:
  ID-1: CMB1 charge: 17.1 Wh (71.8%) condition: 23.8/45.0 Wh (52.8%)
    volts: 10.9 min: 10.8 model: Fujitsu CP715267-01 type: Li-ion
    serial: <filter> status: N/A
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M187
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: dual core model: Intel Core i5-7200U bits: 64 type: MT MCP
    smt: enabled arch: Amber/Kaby Lake note: check rev: 9 cache: L1: 128 KiB
    L2: 512 KiB L3: 3 MiB
  Speed (MHz): avg: 400 min/max: 400/3100 cores: 1: 400 2: 400 3: 400
    4: 400 bogomips: 21599
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Graphics:
  Device-1: Intel HD Graphics 620 vendor: Fujitsu driver: i915 v: kernel
    arch: Gen-9.5 ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2
    bus-ID: 00:02.0 chip-ID: 8086:5916 class-ID: 0300
  Device-2: Chicony FJ Camera type: USB driver: uvcvideo bus-ID: 1-8:4
    chip-ID: 04f2:b5b9 class-ID: 0e02
  Display: x11 server: X.Org v: 1.21.1.3 with: Xwayland v: 22.1.1 driver:
    X: loaded: modesetting unloaded: fbdev,vesa gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1600x900 s-dpi: 96 s-size: 423x238mm (16.65x9.37")
    s-diag: 485mm (19.11")
  Monitor-1: eDP-1 model: LG Display 0x054c res: 1600x900 hz: 60 dpi: 147
    size: 276x156mm (10.87x6.14") diag: 317mm (12.5") modes: 1920x1080
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 22.0.5
    direct render: Yes
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Fujitsu
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:9d71
    class-ID: 0403
  Sound Server-1: ALSA v: k5.15.0-46-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Ethernet I219-LM vendor: Fujitsu driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15d7 class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
  Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel pcie:
    speed: 2.5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 8086:24fd class-ID: 0280
  IF: wlp2s0 state: up mac: <filter>
Drives:
  Local Storage: total: 476.95 GiB used: 20.88 GiB (4.4%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB256HBHQ-000L7
    size: 238.47 GiB speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 5M2QEXH7 temp: 34.9 C scheme: GPT
  ID-2: /dev/sda type: USB vendor: Realtek model: RTL9210 NVME
    size: 238.47 GiB type: SSD serial: <filter> rev: 1.00 scheme: GPT
Partition:
  ID-1: / size: 31.2 GiB used: 7.97 GiB (25.5%) fs: ext4 dev: /dev/sda2
  ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat
    dev: /dev/sda1
Swap:
  ID-1: swap-1 type: file size: 1.48 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 46.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: apt: 2021
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http://packages.linuxmint.com vanessa main upstream import backport
    2: deb http://archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http://archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Info:
  Processes: 237 Uptime: 1h 35m wakeups: 3 Memory: 15.46 GiB used: 2.19 GiB
  (14.2%) Init: systemd v: 249 target: graphical (5) default: graphical
  Compilers: gcc: 11.2.0 alt: 11 Shell: Bash v: 5.1.16
  running-in: gnome-terminal inxi: 3.3.20
Last edited by LockBot on Thu Feb 16, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mfreeman
Level 4
Level 4
Posts: 269
Joined: Thu Jan 21, 2010 3:11 am

Re: How to get in LM 21 Cinnamon all four window corners rounded

Post by mfreeman »

Watching this thread, because I want this, as well...
bluedxca93
Level 1
Level 1
Posts: 27
Joined: Thu Oct 03, 2013 11:25 am

Re: How to get in LM 21 Cinnamon all four window corners rounded

Post by bluedxca93 »

Not perfect but it should do better than nothing:

Code: Select all

.ssd decoration,
decoration {
  border-radius: 6px 6px 8px 8px;
  box-shadow: 1px 6px 0px #919191, -1px 6px 0px #919191, 0px 5px 0px #d6d6d6;
}

.ssd decoration:backdrop,
decoration:backdrop {
  border-radius: 6px 6px 8px 8px;
  box-shadow: 1px 6px 0px #b3b3b3, -1px 6px 0px #b3b3b3, 0px 5px 0px #d6d6d6;
}
Image
Attachments
gtk-3.0.tar.gz
(54.82 KiB) Downloaded 38 times
User avatar
senjoz
Level 5
Level 5
Posts: 889
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: How to get in LM 21 Cinnamon all four window corners rounded

Post by senjoz »

Thank you, bluedxca93, for your hint! I inserted the code you posted in the file /home/user/.config/gtk-3.0/gtk.css. After restarting Cinnamon I got rounded bottom corners as in your screenshot. My previous attempts were without success.

I am not fluent in gtk and css. I just study the code, try to understand it and apply adaptations for which I believe that they should work. I will try to enhance your code to get the window appearance I like.
User avatar
Mr Bill
Level 1
Level 1
Posts: 14
Joined: Mon Nov 08, 2021 1:40 pm

Re: How to get in LM 21 Cinnamon all four window corners rounded

Post by Mr Bill »

Yes, bluedxca93, thank you for the code snippet. Don't know if I could have got it on my own.
Works very well except on non-gtk windows, have the same with metacity3 themes.
Oh well!!

Mr. Bill
User avatar
senjoz
Level 5
Level 5
Posts: 889
Joined: Tue Jun 09, 2020 3:55 am
Location: Kamnik

Re: How to get in LM 21 Cinnamon all four window corners rounded

Post by senjoz »

To get rounded window corners I applied box-shadow decorations in file /home/user/.config/gtk-3.0/gtk.css. Result is:
windows.png

I am not very satisfied with the appearance of windows. Beside this, decorations negatively affect other elements like menus and hints.
menus.png

I am not sure I will continue with this.
bluedxca93
Level 1
Level 1
Posts: 27
Joined: Thu Oct 03, 2013 11:25 am

Re: How to get in LM 21 Cinnamon all four window corners rounded

Post by bluedxca93 »

Hi,
it depends on screen resolution and window drivers and system settings as well as exact gtk-/cinnamon version used how well and how it works. You can add something like
:not(menu):not(tooltip):not(.tooltip) .Do update my patch with the information you gave me next days(am very vusy at the moment)
Locked

Return to “Themes, Icons & Wallpaper”