Skip to content

Commit

Permalink
fixup! feat: add file and color controller setting types
Browse files Browse the repository at this point in the history
  • Loading branch information
acolombier committed Oct 8, 2024
1 parent 74eebc4 commit d91587e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
34 changes: 34 additions & 0 deletions res/controllers/Dummy Device Screen.hid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,40 @@
<product protocol="hid" vendor_id="0xdead" product_id="0xbeaf" />
</devices>
</info>
<settings>
<group label="Cosmetic">
<row orientation="vertical">
<option
variable="theme"
type="enum"
label="Theme use for the screen">
<description>
The theme used for the screens
</description>
<value label="Classic" default="true">stock</value>
<value label="Advanced">advanced</value>
</option>
<option
variable="idleBackground"
type="file"
pattern="Images (*.png *.gif *.jpg)"
label="Idle deck background">
<description>
The background used for empty decks
</description>
</option>
<option
variable="accentColor"
type="color"
default="orange"
label="Accent color">
<description>
The background used for empty decks
</description>
</option>
</row>
</group>
</settings>
<controller id="DummyDevice">
<screens>
<screen identifier="main" width="480" height="360" targetFps="20" pixelType="RBGA" splashoff="500" />
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/legacycontrollersettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,8 @@ class LegacyControllerFileSetting

protected:
LegacyControllerFileSetting(const QDomElement& element,
QFileInfo currentValue,
QFileInfo defaultValue)
const QFileInfo& currentValue,
const QFileInfo& defaultValue)
: AbstractLegacyControllerSetting(element),
m_savedValue(currentValue),
m_defaultValue(defaultValue) {
Expand Down

0 comments on commit d91587e

Please sign in to comment.