gdctl: Show color mode

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192>
This commit is contained in:
Jonas Ådahl 2024-12-19 00:45:29 +01:00 committed by Marge Bot
parent 23ab763be0
commit 53ae155e03
3 changed files with 22 additions and 8 deletions

View File

@ -16,8 +16,8 @@ Monitors:
│ ├──is-builtin ⇒ no
│ ├──display-name ⇒ MetaProduct's Inc. 14"
│ ├──is-for-lease ⇒ no
│ ├──color-mode ⇒ 0
│ └──supported-color-modes ⇒ [0]
│ ├──color-mode ⇒ default
│ └──supported-color-modes ⇒ [default]
└──Monitor DP-2 (MetaProduct's Inc. 13")
├──Vendor: MetaProduct's Inc.
├──Product: MetaMonitor
@ -35,8 +35,8 @@ Monitors:
├──is-builtin ⇒ no
├──display-name ⇒ MetaProduct's Inc. 13"
├──is-for-lease ⇒ no
├──color-mode ⇒ 0
└──supported-color-modes ⇒ [0]
├──color-mode ⇒ default
└──supported-color-modes ⇒ [default]
Logical monitors:
├──Logical monitor #1

View File

@ -34,8 +34,8 @@ Monitors:
│ ├──is-builtin ⇒ no
│ ├──display-name ⇒ MetaProduct's Inc. 14"
│ ├──is-for-lease ⇒ no
│ ├──color-mode ⇒ 0
│ └──supported-color-modes ⇒ [0]
│ ├──color-mode ⇒ default
│ └──supported-color-modes ⇒ [default]
└──Monitor DP-2 (MetaProduct's Inc. 13")
├──Vendor: MetaProduct's Inc.
├──Product: MetaMonitor
@ -71,8 +71,8 @@ Monitors:
├──is-builtin ⇒ no
├──display-name ⇒ MetaProduct's Inc. 13"
├──is-for-lease ⇒ no
├──color-mode ⇒ 0
└──supported-color-modes ⇒ [0]
├──color-mode ⇒ default
└──supported-color-modes ⇒ [default]
Logical monitors:
├──Logical monitor #1

View File

@ -76,6 +76,18 @@ class LayoutMode(NamedEnum):
]
class ColorMode(NamedEnum):
DEFAULT = 0
BT2100 = 1
@classmethod
def enum_names(cls):
return [
(ColorMode.DEFAULT, "default"),
(ColorMode.BT2100, "bt2100"),
]
class ConfigMethod(Enum):
VERIFY = 0
TEMPORARY = 1
@ -85,6 +97,8 @@ class ConfigMethod(Enum):
def translate_property(name, value):
enum_properties = {
"layout-mode": LayoutMode,
"color-mode": ColorMode,
"supported-color-modes": ColorMode,
}
if name in enum_properties: