Skip to content

Commit

Permalink
[#414] Refactored the DisplayCAL.lib.agw.fmresources.
Browse files Browse the repository at this point in the history
  • Loading branch information
eoyilmaz committed Oct 24, 2024
1 parent 23f40ad commit b433eba
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions DisplayCAL/lib/agw/fmresources.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
"""This module contains resources and constants for the FlatMenu library in DisplayCAL.
It defines various styles, states, and images used in the FlatMenu and related controls.
Expand Down Expand Up @@ -129,7 +130,7 @@
rgbSelectTop = wx.Colour(210, 240, 250)
rgbSelectBottom = wx.Colour(185, 215, 250)

check_mark_xpm: list[str] = [
check_mark_xpm = [
" 16 16 16 1",
"` c #000000",
". c #800000",
Expand Down Expand Up @@ -165,7 +166,7 @@
"mmmmmmmmmmmmmmmm",
]

radio_item_xpm: list[str] = [
radio_item_xpm = [
" 16 16 16 1",
"` c #000000",
". c #800000",
Expand Down Expand Up @@ -202,7 +203,7 @@
]


menu_right_arrow_xpm: list[str] = [
menu_right_arrow_xpm = [
" 16 16 8 1",
"` c #ffffff",
". c #000000",
Expand Down Expand Up @@ -230,11 +231,11 @@
"````````````````",
]

# --------------------------------------------------------------------------------------
# ----------------------------------
# Shadow images
# --------------------------------------------------------------------------------------
# ----------------------------------

shadow_right_xpm: list[str] = [
shadow_right_xpm = [
"5 5 1 1",
" c Black",
" ",
Expand All @@ -245,7 +246,7 @@
]

# shadow_right.xpm 5x5
shadow_right_alpha: list[int] = [
shadow_right_alpha = [
168,
145,
115,
Expand Down Expand Up @@ -273,7 +274,7 @@
46,
]

shadow_right_top_xpm: list[str] = [
shadow_right_top_xpm = [
"5 10 1 1",
" c Black",
" ",
Expand All @@ -288,7 +289,7 @@
" ",
]

shadow_right_top_alpha: list[int] = [
shadow_right_top_alpha = [
40,
35,
28,
Expand Down Expand Up @@ -342,7 +343,7 @@
]

# shadow_bottom.xpm 5x5
shadow_bottom_alpha: list[int] = [
shadow_bottom_alpha = [
184,
184,
184,
Expand Down Expand Up @@ -370,7 +371,7 @@
76,
]

shadow_bottom_left_xpm: list[str] = [
shadow_bottom_left_xpm = [
"10 5 1 1",
" c Black",
" ",
Expand All @@ -380,7 +381,7 @@
" ",
]

shadow_bottom_left_alpha: list[int] = [
shadow_bottom_left_alpha = [
22,
44,
73,
Expand Down Expand Up @@ -433,7 +434,7 @@
76,
]

shadow_center_xpm: list[str] = [
shadow_center_xpm = [
"5 5 1 1",
" c Black",
" ",
Expand All @@ -443,7 +444,7 @@
" ",
]

shadow_center_alpha: list[int] = [
shadow_center_alpha = [
161,
139,
110,
Expand Down Expand Up @@ -471,7 +472,7 @@
18,
]

shadow_bottom_xpm: list[str] = [
shadow_bottom_xpm = [
"5 5 1 1",
" c Black",
" ",
Expand All @@ -481,7 +482,7 @@
" ",
]

arrow_down_xpm: list[str] = [
arrow_down_xpm = [
"16 16 3 1",
". c Black",
"X c #FFFFFF",
Expand All @@ -504,10 +505,10 @@
" ",
]

# --------------------------------------------------------------------------------------
# ---------------------------------------------
# Pin images
# --------------------------------------------------------------------------------------
pin_left_xpm: list[str] = [
# ---------------------------------------------
pin_left_xpm = [
" 16 16 8 1",
"` c #ffffff",
". c #000000",
Expand Down Expand Up @@ -535,7 +536,7 @@
"````````````````",
]

pin_down_xpm: list[str] = [
pin_down_xpm = [
" 16 16 8 1",
"` c #ffffff",
". c #000000",
Expand Down Expand Up @@ -583,7 +584,7 @@
"""""\x10\x00\x00\x12""""\x00\x00\x00\x02""""""""""""\x11\x11\x11\x12""""\x00\x00\x00\x02\
""""""""""""""""""""""""""""""""""'

menu_up_arrow_xpm: list[str] = [
menu_up_arrow_xpm = [
"16 16 2 1",
". c Black",
" c White",
Expand All @@ -606,7 +607,7 @@
]


menu_down_arrow_xpm: list[str] = [
menu_down_arrow_xpm = [
"16 16 2 1",
". c Black",
" c White",
Expand All @@ -633,7 +634,7 @@ def getMenuUpArrowBitmap() -> wx.Bitmap:
"""Return a wx.Bitmap object representing a menu up arrow with a white mask.
Returns:
A wx.Bitmap object.
wx.Bitmap: A wx.Bitmap object.
"""
bmp = wx.Bitmap(menu_up_arrow_xpm)
bmp.SetMask(wx.Mask(bmp, wx.WHITE))
Expand All @@ -644,7 +645,7 @@ def getMenuDownArrowBitmap() -> wx.Bitmap:
"""Return a wx.Bitmap object representing a menu down arrow with a white mask.
Returns:
A wx.Bitmap object.
wx.Bitmap: A wx.Bitmap object.
"""
bmp = wx.Bitmap(menu_down_arrow_xpm)
bmp.SetMask(wx.Mask(bmp, wx.WHITE))
Expand Down

0 comments on commit b433eba

Please sign in to comment.