Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT(client): Control + mouse wheel scroll to adjust local volume in TalkingUI #6629

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions src/mumble/LookConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ void LookConfig::load(const Settings &r) {
loadCheckBox(qcbAbbreviateChannelNames, r.bTalkingUI_AbbreviateChannelNames);
loadCheckBox(qcbAbbreviateCurrentChannel, r.bTalkingUI_AbbreviateCurrentChannel);
loadCheckBox(qcbShowLocalListeners, r.bTalkingUI_ShowLocalListeners);
loadCheckBox(qcbCtrlScrollLocalVolAdj, r.talkingUI_CtrlScrollLocalVolAdj);
qsbRelFontSize->setValue(r.iTalkingUI_RelativeFontSize);
qsbSilentUserLifetime->setValue(r.iTalkingUI_SilentUserLifeTime);
qsbChannelHierarchyDepth->setValue(r.iTalkingUI_ChannelHierarchyDepth);
Expand Down Expand Up @@ -268,6 +269,7 @@ void LookConfig::save() const {
s.bTalkingUI_AbbreviateChannelNames = qcbAbbreviateChannelNames->isChecked();
s.bTalkingUI_AbbreviateCurrentChannel = qcbAbbreviateCurrentChannel->isChecked();
s.bTalkingUI_ShowLocalListeners = qcbShowLocalListeners->isChecked();
s.talkingUI_CtrlScrollLocalVolAdj = qcbCtrlScrollLocalVolAdj->isChecked();
s.iTalkingUI_RelativeFontSize = qsbRelFontSize->value();
s.iTalkingUI_SilentUserLifeTime = qsbSilentUserLifetime->value();
s.iTalkingUI_ChannelHierarchyDepth = qsbChannelHierarchyDepth->value();
Expand Down
224 changes: 117 additions & 107 deletions src/mumble/LookConfig.ui
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@
<property name="horizontalSpacing">
<number>6</number>
</property>
<item row="12" column="0">
<item row="13" column="0">
<widget class="QLabel" name="qlPostfixCharCount">
<property name="toolTip">
<string>How many characters from the original name to display at the end of an abbreviated name.</string>
Expand All @@ -614,72 +614,20 @@
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QSpinBox" name="qsbMaxNameLength">
<property name="toolTip">
<string>The preferred maximum length of a channel (hierarchy) name in the Talking UI. Note that this is not a hard limit though.</string>
</property>
<property name="accessibleName">
<string>Maximum channel name length</string>
</property>
</widget>
</item>
<item row="14" column="1">
<widget class="QLineEdit" name="qleAbbreviationReplacement">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>String that gets used instead of the cut-out part of an abbreviated name.</string>
</property>
<property name="accessibleName">
<string>Abbreviation replacement characters</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QSpinBox" name="qsbPostfixCharCount">
<property name="toolTip">
<string>How many characters from the original name to display at the end of an abbreviated name.</string>
</property>
<property name="accessibleName">
<string>Postfix character count</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="qsbRelFontSize">
<property name="toolTip">
<string>Relative font size to use in the Talking UI in percent.</string>
</property>
<property name="accessibleName">
<string>Relative font size (in percent)</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="qlMaxNameLength">
<item row="12" column="0">
<widget class="QLabel" name="qlPrefixCharCount">
<property name="toolTip">
<string>The preferred maximum length of a channel (hierarchy) name in the Talking UI. Note that this is not a hard limit though.</string>
<string>How many characters from the original name to display at the beginning of an abbreviated name.</string>
</property>
<property name="text">
<string>Max. channel name length</string>
<string>Abbreviated prefix characters</string>
</property>
<property name="buddy">
<cstring>qsbMaxNameLength</cstring>
<cstring>qsbPrefixCharCount</cstring>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="7" column="1">
<widget class="QSpinBox" name="qsbSilentUserLifetime">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
Expand All @@ -701,32 +649,36 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="qcbAbbreviateCurrentChannel">
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="qcbShowLocalListeners">
<property name="toolTip">
<string>Whether to also allow abbreviating the current channel of a user (instead of only its parent channels).</string>
<string>Whether to show all of the local user's listeners (ears) in the TalkingUI (and thereby also the channels they are in). </string>
</property>
<property name="text">
<string>Abbreviate current channel name</string>
<string>Show local user's listeners (ears)</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="qlSilentUserLifetime">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="9" column="0">
<widget class="QLabel" name="qlChannelHierarchyDepth">
<property name="toolTip">
<string>A user that is silent for the given amount of seconds will be removed from the Talkin UI.</string>
<string>The names of how many parent channels should be included in the channel's name when displaying it in the TalkingUI?</string>
</property>
<property name="text">
<string>Remove silent user after</string>
<string>Channel hierarchy depth</string>
</property>
<property name="buddy">
<cstring>qsbSilentUserLifetime</cstring>
<cstring>qsbChannelHierarchyDepth</cstring>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="qcbAbbreviateCurrentChannel">
<property name="toolTip">
<string>Whether to also allow abbreviating the current channel of a user (instead of only its parent channels).</string>
</property>
<property name="text">
<string>Abbreviate current channel name</string>
</property>
</widget>
</item>
Expand All @@ -740,7 +692,7 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<widget class="QSpinBox" name="qsbChannelHierarchyDepth">
<property name="toolTip">
<string>The names of how many parent channels should be included in the channel's name when displaying it in the TalkingUI?</string>
Expand All @@ -750,39 +702,42 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="qcbShowLocalListeners">
<item row="11" column="1">
<widget class="QSpinBox" name="qsbMaxNameLength">
<property name="toolTip">
<string>Whether to show all of the local user's listeners (ears) in the TalkingUI (and thereby also the channels they are in). </string>
<string>The preferred maximum length of a channel (hierarchy) name in the Talking UI. Note that this is not a hard limit though.</string>
</property>
<property name="text">
<string>Show local user's listeners (ears)</string>
<property name="accessibleName">
<string>Maximum channel name length</string>
</property>
</widget>
</item>
<item row="14" column="0">
<widget class="QLabel" name="qlAbbreviationReplacement">
<item row="13" column="1">
<widget class="QSpinBox" name="qsbPostfixCharCount">
<property name="toolTip">
<string>String that gets used instead of the cut-out part of an abbreviated name.</string>
</property>
<property name="text">
<string>Abbreviation replacement</string>
<string>How many characters from the original name to display at the end of an abbreviated name.</string>
</property>
<property name="buddy">
<cstring>qleAbbreviationReplacement</cstring>
<property name="accessibleName">
<string>Postfix character count</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="qlPrefixCharCount">
<item row="7" column="0">
<widget class="QLabel" name="qlSilentUserLifetime">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>How many characters from the original name to display at the beginning of an abbreviated name.</string>
<string>A user that is silent for the given amount of seconds will be removed from the Talkin UI.</string>
</property>
<property name="text">
<string>Abbreviated prefix characters</string>
<string>Remove silent user after</string>
</property>
<property name="buddy">
<cstring>qsbPrefixCharCount</cstring>
<cstring>qsbSilentUserLifetime</cstring>
</property>
</widget>
</item>
Expand All @@ -796,39 +751,74 @@
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QSpinBox" name="qsbPrefixCharCount">
<item row="6" column="0">
<widget class="QLabel" name="qlRelFontSize">
<property name="toolTip">
<string>How many characters from the original name to display at the beginning of an abbreviated name.</string>
<string>Relative font size to use in the Talking UI in percent.</string>
</property>
<property name="accessibleName">
<string>Prefix character count</string>
<property name="text">
<string>Rel. font si&amp;ze (%)</string>
</property>
<property name="buddy">
<cstring>qsbRelFontSize</cstring>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="qlRelFontSize">
<item row="6" column="1">
<widget class="QSpinBox" name="qsbRelFontSize">
<property name="toolTip">
<string>Relative font size to use in the Talking UI in percent.</string>
</property>
<property name="accessibleName">
<string>Relative font size (in percent)</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="15" column="1">
<widget class="QLineEdit" name="qleAbbreviationReplacement">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>String that gets used instead of the cut-out part of an abbreviated name.</string>
</property>
<property name="accessibleName">
<string>Abbreviation replacement characters</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="qlMaxNameLength">
<property name="toolTip">
<string>The preferred maximum length of a channel (hierarchy) name in the Talking UI. Note that this is not a hard limit though.</string>
</property>
<property name="text">
<string>Rel. font si&amp;ze (%)</string>
<string>Max. channel name length</string>
</property>
<property name="buddy">
<cstring>qsbRelFontSize</cstring>
<cstring>qsbMaxNameLength</cstring>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="qlChannelHierarchyDepth">
<item row="15" column="0">
<widget class="QLabel" name="qlAbbreviationReplacement">
<property name="toolTip">
<string>The names of how many parent channels should be included in the channel's name when displaying it in the TalkingUI?</string>
<string>String that gets used instead of the cut-out part of an abbreviated name.</string>
</property>
<property name="text">
<string>Channel hierarchy depth</string>
<string>Abbreviation replacement</string>
</property>
<property name="buddy">
<cstring>qsbChannelHierarchyDepth</cstring>
<cstring>qleAbbreviationReplacement</cstring>
</property>
</widget>
</item>
Expand All @@ -842,6 +832,26 @@
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QSpinBox" name="qsbPrefixCharCount">
<property name="toolTip">
<string>How many characters from the original name to display at the beginning of an abbreviated name.</string>
</property>
<property name="accessibleName">
<string>Prefix character count</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="qcbCtrlScrollLocalVolAdj">
Copy link
Member

Choose a reason for hiding this comment

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

Please update the tab order such that it includes this new element at the correct position. Should be possible to do visually using Qt-Designer.

<property name="toolTip">
<string>Whether to change the local volume adjustment for the selected user when scrolling the mouse wheel up (increase) or down (decrease) while Control is pressed.</string>
</property>
<property name="text">
<string>CTRL + Scroll to change selected user's volume</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
1 change: 1 addition & 0 deletions src/mumble/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ struct Settings {
bool bTalkingUI_AbbreviateChannelNames = true;
bool bTalkingUI_AbbreviateCurrentChannel = false;
bool bTalkingUI_ShowLocalListeners = false;
bool talkingUI_CtrlScrollLocalVolAdj = false;
Copy link
Member

Choose a reason for hiding this comment

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

Since the number of people never noticing this feature exists is probably higher than those who would be annoyed by this, I guess it would make sense to enable this by default.

/// relative font size in %
int iTalkingUI_RelativeFontSize = 100;
int iTalkingUI_SilentUserLifeTime = 10;
Expand Down
29 changes: 15 additions & 14 deletions src/mumble/SettingsKeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,21 @@ const SettingsKey CRASH_EMAIL_ADDRESS_KEY = { "crash_report_email


// TalkingUI
const SettingsKey TALKINGUI_POSITION_KEY = { "talkingui_position" };
const SettingsKey SHOW_TALKINGUI_KEY = { "display_talkingui" };
const SettingsKey TALKINGUI_USERS_ALWAYS_VISIBLE_KEY = { "users_always_visible" };
const SettingsKey TALKINGUI_LOCAL_USER_STAYS_VISIBLE_KEY = { "local_user_stays_visible" };
const SettingsKey TALKINGUI_ABBREVIATE_CHANNEL_NAMES_KEY = { "abbreviate_channel_names" };
const SettingsKey TALKINGUI_ABBREVIATE_CURRENT_CHANNEL_KEY = { "abbreviate_current_channel_name" };
const SettingsKey TALKINGUI_DISPLAY_LOCAL_LISTENERS_KEY = { "display_local_listeners" };
const SettingsKey TALKINGUI_RELATIVE_FONT_SIZE_KEY = { "relative_font_size" };
const SettingsKey TALKINGUI_SILENT_USER_LIFETIME_KEY = { "silent_user_lifetime" };
const SettingsKey TALKINGUI_CHANNEL_HIERARCHY_DEPTH_KEY = { "channel_hierarchy_depth" };
const SettingsKey TALKINGUI_MAX_CHANNEL_NAME_LENGTH_KEY = { "max_channel_name_length" };
const SettingsKey TALKINGUI_NAME_PREFIX_COUNT_KEY = { "name_prefix_count" };
const SettingsKey TALKINGUI_NAME_POSTFIX_COUNT_KEY = { "name_postfix_count" };
const SettingsKey TALKINGUI_ABBREVIATION_REPLACEMENT_KEY = { "abbreviation_replacement" };
const SettingsKey TALKINGUI_POSITION_KEY = { "talkingui_position" };
const SettingsKey SHOW_TALKINGUI_KEY = { "display_talkingui" };
const SettingsKey TALKINGUI_USERS_ALWAYS_VISIBLE_KEY = { "users_always_visible" };
const SettingsKey TALKINGUI_LOCAL_USER_STAYS_VISIBLE_KEY = { "local_user_stays_visible" };
const SettingsKey TALKINGUI_ABBREVIATE_CHANNEL_NAMES_KEY = { "abbreviate_channel_names" };
const SettingsKey TALKINGUI_ABBREVIATE_CURRENT_CHANNEL_KEY = { "abbreviate_current_channel_name" };
const SettingsKey TALKINGUI_DISPLAY_LOCAL_LISTENERS_KEY = { "display_local_listeners" };
const SettingsKey TALKINGUI_RELATIVE_FONT_SIZE_KEY = { "relative_font_size" };
const SettingsKey TALKINGUI_SILENT_USER_LIFETIME_KEY = { "silent_user_lifetime" };
const SettingsKey TALKINGUI_CHANNEL_HIERARCHY_DEPTH_KEY = { "channel_hierarchy_depth" };
const SettingsKey TALKINGUI_MAX_CHANNEL_NAME_LENGTH_KEY = { "max_channel_name_length" };
const SettingsKey TALKINGUI_NAME_PREFIX_COUNT_KEY = { "name_prefix_count" };
const SettingsKey TALKINGUI_NAME_POSTFIX_COUNT_KEY = { "name_postfix_count" };
const SettingsKey TALKINGUI_ABBREVIATION_REPLACEMENT_KEY = { "abbreviation_replacement" };
const SettingsKey TALKINGUI_CTRL_SCROLL_LOCAL_VOLUME_ADJUSTMENT_KEY = { "ctrl_scroll_local_volume_adjustment" };

// Channel hierarchy
const SettingsKey CHANNEL_NAME_SEPARATOR_KEY = { "channel_name_separator" };
Expand Down
3 changes: 2 additions & 1 deletion src/mumble/SettingsMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@
PROCESS(talkingui, TALKINGUI_MAX_CHANNEL_NAME_LENGTH_KEY, iTalkingUI_MaxChannelNameLength) \
PROCESS(talkingui, TALKINGUI_NAME_PREFIX_COUNT_KEY, iTalkingUI_PrefixCharCount) \
PROCESS(talkingui, TALKINGUI_NAME_POSTFIX_COUNT_KEY, iTalkingUI_PostfixCharCount) \
PROCESS(talkingui, TALKINGUI_ABBREVIATION_REPLACEMENT_KEY, qsTalkingUI_AbbreviationReplacement)
PROCESS(talkingui, TALKINGUI_ABBREVIATION_REPLACEMENT_KEY, qsTalkingUI_AbbreviationReplacement) \
PROCESS(talkingui, TALKINGUI_CTRL_SCROLL_LOCAL_VOLUME_ADJUSTMENT_KEY, talkingUI_CtrlScrollLocalVolAdj)


#define CHANNEL_HIERARCHY_SETTINGS PROCESS(channel_hierarchy, CHANNEL_NAME_SEPARATOR_KEY, qsHierarchyChannelSeparator)
Expand Down
Loading