From dcf269eeb9f6c0b82244e05ecec1a60d180ec077 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Sat, 20 Mar 2021 16:53:58 +0100 Subject: [PATCH] stuff --- Library/0BDFDB.plugin.js | 12 ++++-------- Library/_res/BDFDB.raw.css | 4 ++++ .../GameActivityToggle.plugin.js | 2 +- Themes/BlurpleRecolor/BlurpleRecolor.css | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Library/0BDFDB.plugin.js b/Library/0BDFDB.plugin.js index ee9379aeb1..e08309e561 100644 --- a/Library/0BDFDB.plugin.js +++ b/Library/0BDFDB.plugin.js @@ -6616,7 +6616,6 @@ module.exports = (_ => { } }; - let NativeSubSelectExport = (BDFDB.ModuleUtils.find(m => m == InternalComponents.NativeSubComponents.Select, false) || {exports: {}}).exports; InternalComponents.LibraryComponents.Select = reactInitialized && class BDFDB_Select extends LibraryModules.React.Component { handleChange(value) { this.props.value = value.value || value; @@ -6624,14 +6623,11 @@ module.exports = (_ => { BDFDB.ReactUtils.forceUpdate(this); } render() { - let lightTheme = BDFDB.DiscordUtils.getTheme() == BDFDB.disCN.themelight; - return BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Flex, { + return BDFDB.ReactUtils.createElement("div", { className: BDFDB.disCN.selectwrapper, - direction: InternalComponents.LibraryComponents.Flex.Direction.HORIZONTAL, - align: InternalComponents.LibraryComponents.Flex.Align.CENTER, - children: BDFDB.ReactUtils.createElement(InternalComponents.NativeSubComponents.Select, Object.assign({}, this.props, { - lightThemeColorOverrides: NativeSubSelectExport[lightTheme ? "LIGHT_THEME_COLORS" : "DARK_THEME_COLORS"], - darkThemeColorOverrides: NativeSubSelectExport[lightTheme ? "LIGHT_THEME_COLORS" : "DARK_THEME_COLORS"], + children: BDFDB.ReactUtils.createElement(InternalComponents.NativeSubComponents.SearchableSelect, Object.assign({}, this.props, { + maxVisibleItems: this.props.maxVisibleItems || 7, + renderOptionLabel: this.props.optionRenderer, onChange: this.handleChange.bind(this) })) }); diff --git a/Library/_res/BDFDB.raw.css b/Library/_res/BDFDB.raw.css index 684fc5292d..07ff329243 100644 --- a/Library/_res/BDFDB.raw.css +++ b/Library/_res/BDFDB.raw.css @@ -359,6 +359,10 @@ img:not([src]), img[src=""], img[src="null"] { margin-left: 12px; } +[REPLACE_CLASS_selectwrapper] { + display: flex; + align-items: center; +} [REPLACE_CLASS_selectwrapper] [REPLACE_CLASS_select] { flex: 1 1 auto; } diff --git a/Plugins/GameActivityToggle/GameActivityToggle.plugin.js b/Plugins/GameActivityToggle/GameActivityToggle.plugin.js index 5eaf0cc4f7..25c9450f73 100644 --- a/Plugins/GameActivityToggle/GameActivityToggle.plugin.js +++ b/Plugins/GameActivityToggle/GameActivityToggle.plugin.js @@ -141,7 +141,7 @@ module.exports = (_ => { basis: "50%", options: sounds.map(o => ({value: o, label: o.split(/[-_]/g).map(BDFDB.LibraryModules.StringUtils.upperCaseFirstChar).join(" ")})), value: this.settings.selections[key], - onChange: BDFDB.LibraryModules.SoundUtils.playSound + onChange: value => BDFDB.LibraryModules.SoundUtils.playSound(value, 0.4) })); return settingsItems; diff --git a/Themes/BlurpleRecolor/BlurpleRecolor.css b/Themes/BlurpleRecolor/BlurpleRecolor.css index 826a00b625..21658b5945 100644 --- a/Themes/BlurpleRecolor/BlurpleRecolor.css +++ b/Themes/BlurpleRecolor/BlurpleRecolor.css @@ -1847,20 +1847,20 @@ filter: brightness(120%); } -.theme-light .select-1Pkeg4:focus, /* dropdown select nitro subscription */ -.theme-light .lookFilled-1h1y05.select-1Pkeg4:focus { +.theme-light .select-2fjwPw:focus, /* dropdown select nitro subscription */ +.theme-light .lookFilled-22uAsw.select-2fjwPw:focus { border-color: rgb(var(--vaccentcolor)); } -.theme-light .lookFilled-1h1y05.select-1Pkeg4:hover.selectOpen-hQuR6b, -.theme-light .lookFilled-1h1y05.selectOpen-hQuR6b { +.theme-light .lookFilled-22uAsw.select-2fjwPw:hover.open-kZ53_U, +.theme-light .lookFilled-22uAsw.open-kZ53_U { border-color: rgb(var(--vaccentcolor)) rgb(var(--vaccentcolor)) #b9bbbe; } -.theme-dark .select-1Pkeg4:focus, -.theme-dark .lookFilled-1h1y05.select-1Pkeg4:focus { +.theme-dark .select-2fjwPw:focus, +.theme-dark .lookFilled-22uAsw.select-2fjwPw:focus { border-color: rgb(var(--vaccentcolor)); } -.theme-dark .lookFilled-1h1y05.select-1Pkeg4:hover.selectOpen-hQuR6b, -.theme-dark .lookFilled-1h1y05.selectOpen-hQuR6b { +.theme-dark .lookFilled-22uAsw.select-2fjwPw:hover.open-kZ53_U, +.theme-dark .lookFilled-22uAsw.open-kZ53_U { border-color: rgb(var(--vaccentcolor)) rgb(var(--vaccentcolor)) rgba(0, 0, 0, 0.3); } .selectedIcon-3uS11H { /* dropdown select selected icon */