Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions res/skins/Deere (64 Samplers)/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<!-- Library -->
<attribute config_key="[Skin],show_library">1</attribute>
<attribute config_key="[Master],maximize_library">0</attribute>
<attribute config_key="[Library],maximize_library">0</attribute>
<attribute persist="true" config_key="[PreviewDeck],show_previewdeck">0</attribute>
<attribute persist="true" config_key="[Library],show_coverart">1</attribute>
<!--Disable hidden effect routing Buttons-->
Expand Down Expand Up @@ -187,7 +187,7 @@
<Template src="skin:../Deere/tool_bar.xml"/>

<!-- regular or maximized library -->
<WidgetStack currentpage="[Master],maximize_library">
<WidgetStack currentpage="[Library],maximize_library">
<Children>

<!-- regular library with decks etc. -->
Expand Down Expand Up @@ -221,7 +221,7 @@
</Splitter><!-- regular library with decks etc. -->

<!-- maximized Library with minimal decks -->
<WidgetGroup trigger="[Master],maximize_library" on_hide_select="0">
<WidgetGroup trigger="[Library],maximize_library" on_hide_select="0">
<Layout>vertical</Layout>
<SizePolicy>me,me</SizePolicy>
<Children>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Deere/library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<Template src="skin:hide_show_button.xml">
<SetVariable name="TooltipId">maximize_library</SetVariable>
<SetVariable name="object_name">LibraryToggle</SetVariable>
<SetVariable name="control">[Master],maximize_library</SetVariable>
<SetVariable name="control">[Library],maximize_library</SetVariable>
</Template>
</Children>
</WidgetGroup>
Expand Down
6 changes: 3 additions & 3 deletions res/skins/Deere/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<!-- Library -->
<attribute config_key="[Skin],show_library">1</attribute>
<attribute config_key="[Master],maximize_library">0</attribute>
<attribute config_key="[Library],maximize_library">0</attribute>
<attribute persist="true" config_key="[PreviewDeck],show_previewdeck">0</attribute>
<attribute persist="true" config_key="[Library],show_coverart">1</attribute>
<!--Disable hidden effect routing Buttons-->
Expand Down Expand Up @@ -186,7 +186,7 @@
<Template src="skin:../Deere/tool_bar.xml"/>

<!-- regular or maximized library -->
<WidgetStack currentpage="[Master],maximize_library">
<WidgetStack currentpage="[Library],maximize_library">
<Children>

<!-- regular library with decks etc. -->
Expand Down Expand Up @@ -220,7 +220,7 @@
</Splitter><!-- regular library with decks etc. -->

<!-- maximized Library with minimal decks -->
<WidgetGroup trigger="[Master],maximize_library" on_hide_select="0">
<WidgetGroup trigger="[Library],maximize_library" on_hide_select="0">
<Layout>vertical</Layout>
<SizePolicy>me,me</SizePolicy>
<Children>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Deere/tool_bar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
</Template>
</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
<Transform><Not/></Transform>
</Connection>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/LateNight/library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<SetVariable name="TooltipId">maximize_library</SetVariable>
<SetVariable name="ObjectName">LibExpand</SetVariable>
<SetVariable name="Size">16f,18me</SetVariable>
<SetVariable name="ConfigKey">[Master],maximize_library</SetVariable>
<SetVariable name="ConfigKey">[Library],maximize_library</SetVariable>
</Template>
</Children>
</WidgetGroup><!-- LibExpandBox -->
Expand Down
8 changes: 4 additions & 4 deletions res/skins/LateNight/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<!-- Mic / Aux -->
<attribute persist="true" config_key="[Microphone],show_microphone">0</attribute>
<!-- Library -->
<attribute config_key="[Master],maximize_library">0</attribute>
<attribute config_key="[Library],maximize_library">0</attribute>
<attribute persist="true" config_key="[LateNight],max_lib_show_decks">1</attribute>
<attribute persist="true" config_key="[PreviewDeck],show_previewdeck">0</attribute>
<attribute persist="true" config_key="[Library],show_coverart">1</attribute>
Expand Down Expand Up @@ -393,7 +393,7 @@
<!-- Some helpers to show widgets and switch layouts
depending on the skin configuration.
Apparently putting those here keeps i.e. the spinny
config when [Master],maximize_library is toggled. -->
config when [Library],maximize_library is toggled. -->
<Template src="skin:/helpers/skin_helper_mic_ducking.xml"/>
<Template src="skin:/helpers/skin_helper_spinny-cover.xml"/>

Expand All @@ -406,7 +406,7 @@
<Children>

<!-- regular or maximized library -->
<WidgetStack currentpage="[Master],maximize_library">
<WidgetStack currentpage="[Library],maximize_library">
<Children>

<!-- Waveforms, Decks, Effects... / Library
Expand Down Expand Up @@ -472,7 +472,7 @@
<!-- Decks, Effects, Samplers, Mic/Aux, Library -->

<!-- Maximized Library & mini decks only -->
<WidgetGroup trigger="[Master],maximize_library" on_hide_select="0">
<WidgetGroup trigger="[Library],maximize_library" on_hide_select="0">
<Layout>vertical</Layout>
<SizePolicy>me,me</SizePolicy>
<Children>
Expand Down
14 changes: 7 additions & 7 deletions res/skins/LateNight/skin_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Description:
<Children>
</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
<Connection>
Expand Down Expand Up @@ -156,7 +156,7 @@ Description:
when switching deck size -->
<Layout>horizontal</Layout>
<Children>
<WidgetStack currentpage="[Master],maximize_library">
<WidgetStack currentpage="[Library],maximize_library">
<Children>
<!-- regular library -->
<WidgetStack currentpage="[Master],show_mixer" persist="true" on_hide_select="0">
Expand Down Expand Up @@ -198,7 +198,7 @@ Description:
</Children>
</WidgetStack>
<!-- maximized library -->
<WidgetGroup trigger="[Master],maximize_library" on_hide_select="0">
<WidgetGroup trigger="[Library],maximize_library" on_hide_select="0">
<Layout>stacked</Layout>
<Children>
<!-- translucent cover when there are no decks above BIG Library-->
Expand Down Expand Up @@ -229,7 +229,7 @@ Description:
<Children>
<!-- translucent cover when Library is not maximized -->
<Template src="skin:/helpers/skin_settings_cover.xml">
<SetVariable name="Setting">[Master],maximize_library</SetVariable>
<SetVariable name="Setting">[Library],maximize_library</SetVariable>
</Template>

<WidgetGroup>
Expand Down Expand Up @@ -285,7 +285,7 @@ Description:
<Children>
<!-- translucent cover when Library is maximized -->
<Template src="skin:/helpers/skin_settings_cover.xml">
<SetVariable name="Setting">[Master],maximize_library</SetVariable>
<SetVariable name="Setting">[Library],maximize_library</SetVariable>
</Template>

<WidgetGroup>
Expand Down Expand Up @@ -367,7 +367,7 @@ Description:
<Children>
<!-- translucent cover when Library is maximized -->
<Template src="skin:/helpers/skin_settings_cover.xml">
<SetVariable name="Setting">[Master],maximize_library</SetVariable>
<SetVariable name="Setting">[Library],maximize_library</SetVariable>
</Template>

<WidgetGroup>
Expand Down Expand Up @@ -453,7 +453,7 @@ Description:
<Children>
<!-- translucent cover when Library is maximized -->
<Template src="skin:/helpers/skin_settings_cover.xml">
<SetVariable name="Setting">[Master],maximize_library</SetVariable>
<SetVariable name="Setting">[Library],maximize_library</SetVariable>
</Template>

<WidgetGroup>
Expand Down
6 changes: 3 additions & 3 deletions res/skins/LateNight/toolbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<SetVariable name="Size">80f,20f</SetVariable>
<SetVariable name="state_0_text">BIG LIBRARY</SetVariable>
<SetVariable name="state_1_text">BIG LIBRARY</SetVariable>
<SetVariable name="ConfigKey">[Master],maximize_library</SetVariable>
<SetVariable name="ConfigKey">[Library],maximize_library</SetVariable>
</Template>

<WidgetGroup>
Expand Down Expand Up @@ -81,7 +81,7 @@

</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<Transform><Not/></Transform>
<BindProperty>visible</BindProperty>
</Connection>
Expand Down Expand Up @@ -113,7 +113,7 @@

</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</WidgetGroup><!-- GUI toggles with maximized library -->
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Shade/decks_row_small.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</WidgetGroup>
</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</WidgetGroup>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Shade/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@

</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
<Transform><Not/></Transform>
</Connection>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Shade/srcrow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</WidgetGroup>
</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
<Transform>
<Not/>
Expand Down
8 changes: 4 additions & 4 deletions res/skins/Tango (64 Samplers)/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<attribute persist="true" config_key="[Microphone],show_microphone">0</attribute>

<!-- Library -->
<attribute config_key="[Master],maximize_library">0</attribute>
<attribute config_key="[Library],maximize_library">0</attribute>
<attribute persist="true" config_key="[PreviewDeck],show_previewdeck">0</attribute>
<attribute persist="true" config_key="[Library],show_coverart">1</attribute>
<!--Disable hidden effect routing Buttons-->
Expand Down Expand Up @@ -407,7 +407,7 @@
<Template src="skin:../Tango/topbar.xml"/>

<!-- regular / maximized library -->
<WidgetStack currentpage="[Master],maximize_library">
<WidgetStack currentpage="[Library],maximize_library">
<Children>
<!-- regular library
[stacked waveforms]
Expand All @@ -421,7 +421,7 @@
<SplitSizesConfigKey>[Skin],stackedWaveforms_splitSize</SplitSizesConfigKey>
<Collapsible>0,0</Collapsible>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<Transform><Not/></Transform>
<BindProperty>visible</BindProperty>
</Connection>
Expand Down Expand Up @@ -509,7 +509,7 @@
<Layout>vertical</Layout>
<SizePolicy>me,me</SizePolicy>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
<Children>
Expand Down
4 changes: 2 additions & 2 deletions res/skins/Tango/library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Description:
<WidgetGroup>
<Size>1me,2f</Size>
<Connection>
<ConfigKey persist="true">[Master],maximize_library</ConfigKey>
<ConfigKey persist="true">[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</WidgetGroup>
Expand Down Expand Up @@ -82,7 +82,7 @@ Description:
<Template src="skin:../Tango/controls/button_2state_persist.xml">
<SetVariable name="ObjectName">LibMiniMaxiButton</SetVariable>
<SetVariable name="Size">19f,15f</SetVariable>
<SetVariable name="ConfigKey">[Master],maximize_library</SetVariable>
<SetVariable name="ConfigKey">[Library],maximize_library</SetVariable>
</Template>
</Children>
</WidgetGroup>
Expand Down
8 changes: 4 additions & 4 deletions res/skins/Tango/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<attribute persist="true" config_key="[Microphone],show_microphone">0</attribute>

<!-- Library -->
<attribute config_key="[Master],maximize_library">0</attribute>
<attribute config_key="[Library],maximize_library">0</attribute>
<attribute persist="true" config_key="[PreviewDeck],show_previewdeck">0</attribute>
<attribute persist="true" config_key="[Library],show_coverart">1</attribute>
<!--Disable hidden effect routing Buttons-->
Expand Down Expand Up @@ -401,7 +401,7 @@
<Template src="skin:../Tango/topbar.xml"/>

<!-- regular / maximized library -->
<WidgetStack currentpage="[Master],maximize_library">
<WidgetStack currentpage="[Library],maximize_library">
<Children>
<!-- regular library
[stacked waveforms]
Expand All @@ -415,7 +415,7 @@
<SplitSizesConfigKey>[Skin],stackedWaveforms_splitSize</SplitSizesConfigKey>
<Collapsible>0,0</Collapsible>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<Transform><Not/></Transform>
<BindProperty>visible</BindProperty>
</Connection>
Expand Down Expand Up @@ -503,7 +503,7 @@
<Layout>vertical</Layout>
<SizePolicy>me,me</SizePolicy>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
<Children>
Expand Down
4 changes: 2 additions & 2 deletions res/skins/Tango/topbar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Description:
</WidgetGroup>
</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<Transform><Not/></Transform>
<BindProperty>visible</BindProperty>
</Connection>
Expand Down Expand Up @@ -239,7 +239,7 @@ Description:
</Template>
</Children>
<Connection>
<ConfigKey>[Master],maximize_library</ConfigKey>
<ConfigKey>[Library],maximize_library</ConfigKey>
<Transform><Not/></Transform>
<BindProperty>visible</BindProperty>
</Connection>
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/controlpickermenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ ControlPickerMenu::ControlPickerMenu(QWidget* pParent)
tr("Cover Art Show/Hide (Library)"),
tr("Show/hide cover art in the library"),
guiMenu);
addControl("[Master]",
addControl("[Library]",
"maximize_library",
tr("Library Maximize/Restore"),
tr("Maximize the track library to take up all the available screen "
Expand Down
7 changes: 7 additions & 0 deletions src/coreservices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "soundio/soundmanager.h"
#include "sources/soundsourceproxy.h"
#include "util/db/dbconnectionpooled.h"
#include "util/defs.h"
#include "util/font.h"
#include "util/logger.h"
#include "util/screensaver.h"
Expand Down Expand Up @@ -438,6 +439,11 @@ void CoreServices::initialize(QApplication* pApp) {
m_pPlayerManager->loadSamplers();

m_pTouchShift = std::make_unique<ControlPushButton>(ConfigKey("[Controls]", "touch_shift"));
m_pMaximizeLibrary = std::make_unique<ControlPushButton>(kMaximizeLibraryConfigKey);
m_pMaximizeLibrary->setButtonMode(ControlPushButton::TOGGLE);
ControlDoublePrivate::insertAlias(
ConfigKey("[Master]", "maximize_library"),
kMaximizeLibraryConfigKey);

// Load tracks in args.qlMusicFiles (command line arguments) into player
// 1 and 2:
Expand Down Expand Up @@ -612,6 +618,7 @@ void CoreServices::finalize() {
m_pDbConnectionPool.reset(); // should drop the last reference

m_pTouchShift.reset();
m_pMaximizeLibrary.reset();

m_pControlIndicatorTimer.reset();

Expand Down
1 change: 1 addition & 0 deletions src/coreservices.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class CoreServices : public QObject {
std::shared_ptr<mixxx::ScreensaverManager> m_pScreensaverManager;

std::unique_ptr<ControlPushButton> m_pTouchShift;
std::unique_ptr<ControlPushButton> m_pMaximizeLibrary;

Timer m_runtime_timer;
const CmdlineArgs& m_cmdlineArgs;
Expand Down
4 changes: 4 additions & 0 deletions src/util/defs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#pragma once

#include "preferences/configobject.h"

// Maximum buffer length to each EngineObject::process call.
//TODO: Replace this with mixxx::AudioParameters::bufferSize()
constexpr unsigned int MAX_BUFFER_LEN = 160000;

constexpr int kMaxNumberOfDecks = 4;

const ConfigKey kMaximizeLibraryConfigKey = ConfigKey("[Library]", "maximize_library");
Copy link
Copy Markdown
Member

@Holzhaus Holzhaus Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's reduce redundancy if we rename it anyway.

Also, the active verb in maximize_library makes it sound like a button (e.g. [ChannelN],hotcue_X_activate), which means that you have to press [1.0] and release [0.0] to enable, the press and release again to disable.

But in this case it's actually a flag (1.0 = enabled, 0.0 = disabled). So I think we should use a passive verb here to indicate that (like we do in [ChannelN],loop_enabled).

Suggested change
const ConfigKey kMaximizeLibraryConfigKey = ConfigKey("[Library]", "maximize_library");
const ConfigKey kMaximizeLibraryConfigKey = ConfigKey("[Library]", "maximized");

Copy link
Copy Markdown
Member Author

@ronso0 ronso0 Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean, but I think for consistency we should either name it like show_previewdeck and other visibility controls -- or rename all to [Skin],library_maximized, [Skin],previewdeck_visible etc.
Btw despite the redundancy the benefit of maximize_library is that the name of the control matches the tooltip which is convenient for skin development.

And actually the reason for using the [Library] is solely that it's listed in the respective chapter in the manual, see the bug report. [Skin],maxmize_library would be more appropriate IMO.
On that topic: I think we should rename the chapters to Deck controls, Skin controls etc., much like the submenus in the control picker menu. Also, the Group elements in the chapters do decrease the readability IMHO, so I'd appreciate if we'd rename them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the chapters to Deck controls, Skin controls etc., much like the submenus in the control picker menu.

image
vs.
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Since we are making an alias anyway, let's call it [Library], maximized.

Loading