mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00

Shifts the contents of `kvui.py`, and thus all CommonClient-based clients as well as Launcher, to using KivyMD. KivyMD is an extension for Kivy that is almost fully compatible with pre-existing Kivy components, while providing Material Design support for theming and overall visual design as well as useful pre-existing built in components such as Snackbars, Tooltips, and a built-in File Manager (not currently being used). As a part of this shift, the launcher was completely overhauled, adding the ability to filter the list of components down to each type of component, the ability to define favorite components and filter to them, and add shortcuts for launcher components to the desktop. An optional description field was added to Component for display within the new launcher. The theme (Light/Dark) and primary palette have also been exposed to users via client/user.kv.
194 lines
5.5 KiB
Plaintext
194 lines
5.5 KiB
Plaintext
<TextColors>:
|
|
# Hex-format RGB colors used in clients. Resets after an update/install.
|
|
# To avoid, you can copy the TextColors section into a new "user.kv" next to this file
|
|
# and it will read from there instead.
|
|
black: "000000"
|
|
red: "EE0000"
|
|
green: "00FF7F" # typically a location
|
|
yellow: "FAFAD2" # typically other slots/players
|
|
blue: "6495ED" # typically extra info (such as entrance)
|
|
magenta: "EE00EE" # typically your slot/player
|
|
cyan: "00EEEE" # typically regular item
|
|
slateblue: "6D8BE8" # typically useful item
|
|
plum: "AF99EF" # typically progression item
|
|
salmon: "FA8072" # typically trap item
|
|
white: "FFFFFF" # not used, if you want to change the generic text color change color in Label
|
|
orange: "FF7700" # Used for command echo
|
|
# KivyMD theming parameters
|
|
theme_style: "Dark" # Light/Dark
|
|
primary_palette: "Green" # Many options
|
|
dynamic_scheme_name: "TONAL_SPOT"
|
|
<MDLabel>:
|
|
color: self.theme_cls.primaryColor
|
|
<TooltipLabel>:
|
|
adaptive_height: True
|
|
font_size: dp(20)
|
|
markup: True
|
|
halign: "left"
|
|
<SelectableLabel>:
|
|
size_hint: 1, None
|
|
canvas.before:
|
|
Color:
|
|
rgba: (.0, 0.9, .1, .3) if self.selected else self.theme_cls.surfaceContainerLowColor
|
|
Rectangle:
|
|
size: self.size
|
|
pos: self.pos
|
|
<MarkupDropdownItem>
|
|
orientation: "vertical"
|
|
|
|
MDLabel:
|
|
text: root.text
|
|
valign: "center"
|
|
padding_x: "12dp"
|
|
shorten: True
|
|
shorten_from: "right"
|
|
theme_text_color: "Custom"
|
|
markup: True
|
|
text_color:
|
|
app.theme_cls.onSurfaceVariantColor \
|
|
if not root.text_color else \
|
|
root.text_color
|
|
|
|
MDDivider:
|
|
md_bg_color:
|
|
( \
|
|
app.theme_cls.outlineVariantColor \
|
|
if not root.divider_color \
|
|
else root.divider_color \
|
|
) \
|
|
if root.divider else \
|
|
(0, 0, 0, 0)
|
|
<UILog>:
|
|
messages: 1000 # amount of messages stored in client logs.
|
|
cols: 1
|
|
viewclass: 'SelectableLabel'
|
|
scroll_y: 0
|
|
scroll_type: ["content", "bars"]
|
|
bar_width: dp(12)
|
|
effect_cls: "ScrollEffect"
|
|
SelectableRecycleBoxLayout:
|
|
default_size: None, dp(20)
|
|
default_size_hint: 1, None
|
|
size_hint_y: None
|
|
height: self.minimum_height
|
|
orientation: 'vertical'
|
|
spacing: dp(3)
|
|
<HintLabel>:
|
|
canvas.before:
|
|
Color:
|
|
rgba: (.0, 0.9, .1, .3) if self.selected else self.theme_cls.surfaceContainerHighColor if self.striped else self.theme_cls.surfaceContainerLowColor
|
|
Rectangle:
|
|
size: self.size
|
|
pos: self.pos
|
|
height: self.minimum_height
|
|
receiving_text: "Receiving Player"
|
|
item_text: "Item"
|
|
finding_text: "Finding Player"
|
|
location_text: "Location"
|
|
entrance_text: "Entrance"
|
|
status_text: "Status"
|
|
TooltipLabel:
|
|
id: receiving
|
|
sort_key: 'receiving'
|
|
text: root.receiving_text
|
|
halign: 'center'
|
|
valign: 'center'
|
|
pos_hint: {"center_y": 0.5}
|
|
TooltipLabel:
|
|
id: item
|
|
sort_key: 'item'
|
|
text: root.item_text
|
|
halign: 'center'
|
|
valign: 'center'
|
|
pos_hint: {"center_y": 0.5}
|
|
TooltipLabel:
|
|
id: finding
|
|
sort_key: 'finding'
|
|
text: root.finding_text
|
|
halign: 'center'
|
|
valign: 'center'
|
|
pos_hint: {"center_y": 0.5}
|
|
TooltipLabel:
|
|
id: location
|
|
sort_key: 'location'
|
|
text: root.location_text
|
|
halign: 'center'
|
|
valign: 'center'
|
|
pos_hint: {"center_y": 0.5}
|
|
TooltipLabel:
|
|
id: entrance
|
|
sort_key: 'entrance'
|
|
text: root.entrance_text
|
|
halign: 'center'
|
|
valign: 'center'
|
|
pos_hint: {"center_y": 0.5}
|
|
TooltipLabel:
|
|
id: status
|
|
sort_key: 'status'
|
|
text: root.status_text
|
|
halign: 'center'
|
|
valign: 'center'
|
|
pos_hint: {"center_y": 0.5}
|
|
<HintLog>:
|
|
cols: 1
|
|
viewclass: 'HintLabel'
|
|
scroll_y: self.height
|
|
scroll_type: ["content", "bars"]
|
|
bar_width: dp(12)
|
|
effect_cls: "ScrollEffect"
|
|
SelectableRecycleBoxLayout:
|
|
default_size: None, dp(20)
|
|
default_size_hint: 1, None
|
|
size_hint_y: None
|
|
height: self.minimum_height
|
|
orientation: 'vertical'
|
|
spacing: dp(3)
|
|
<ServerLabel>:
|
|
text: "Server:"
|
|
size_hint_x: None
|
|
<ContainerLayout>:
|
|
size_hint_x: 1
|
|
size_hint_y: 1
|
|
pos: (0, 0)
|
|
<ToolTip>:
|
|
size: self.texture_size
|
|
size_hint: None, None
|
|
font_size: dp(18)
|
|
pos_hint: {'center_y': 0.5, 'center_x': 0.5}
|
|
halign: "left"
|
|
canvas.before:
|
|
Color:
|
|
rgba: 0.2, 0.2, 0.2, 1
|
|
Rectangle:
|
|
size: self.size
|
|
pos: self.pos
|
|
Color:
|
|
rgba: 0.098, 0.337, 0.431, 1
|
|
Line:
|
|
width: 3
|
|
rectangle: self.x-2, self.y-2, self.width+4, self.height+4
|
|
Color:
|
|
rgba: 0.235, 0.678, 0.843, 1
|
|
Line:
|
|
width: 1
|
|
rectangle: self.x-2, self.y-2, self.width+4, self.height+4
|
|
<ServerToolTip>:
|
|
pos_hint: {'center_y': 0.5, 'center_x': 0.5}
|
|
<AutocompleteHintInput>
|
|
size_hint_y: None
|
|
height: dp(30)
|
|
multiline: False
|
|
write_tab: False
|
|
<ScrollBox>:
|
|
layout: layout
|
|
bar_width: "12dp"
|
|
scroll_wheel_distance: 40
|
|
do_scroll_x: False
|
|
|
|
MDBoxLayout:
|
|
id: layout
|
|
orientation: "vertical"
|
|
spacing: 10
|
|
size_hint_y: None
|
|
height: self.minimum_height
|