mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-04-20 22:17:23 -05:00
Fix light macOS buttons
This commit is contained in:
parent
f6e4769043
commit
0195f65d63
|
|
@ -14,6 +14,7 @@ function ButtonMac(props: {
|
|||
const styles = styles_mac;
|
||||
|
||||
const window_focused = useContext(WindowFocusedContext);
|
||||
const colour_scheme = useColourScheme();
|
||||
const accent_colour = useAccentColour();
|
||||
|
||||
const [hovered, setMouseOver] = useState(false);
|
||||
|
|
@ -30,6 +31,7 @@ function ButtonMac(props: {
|
|||
return <Pressable
|
||||
style={[
|
||||
styles.button,
|
||||
colour_scheme === 'light' ? styles.buttonLight : null,
|
||||
active ? {backgroundColor: props.color ?? accent_colour} : null,
|
||||
]}
|
||||
// @ts-expect-error react-native-web
|
||||
|
|
@ -44,7 +46,10 @@ function ButtonMac(props: {
|
|||
active ? styles.innerActive : null,
|
||||
active && pressed_appearance ? styles.innerPressed : null,
|
||||
]}>
|
||||
<Text style={styles.text}>{props.title}</Text>
|
||||
<Text style={[
|
||||
styles.text,
|
||||
colour_scheme === 'light' && !active ? styles.textLight : null,
|
||||
]}>{props.title}</Text>
|
||||
</View>
|
||||
</Pressable>;
|
||||
}
|
||||
|
|
@ -56,6 +61,10 @@ const styles_mac = StyleSheet.create({
|
|||
borderRadius: 3,
|
||||
boxShadow: '#00000030 0px 0px 1px',
|
||||
},
|
||||
buttonLight: {
|
||||
backgroundColor: '#ffffff',
|
||||
boxShadow: '#0000008a 0px 0px 1px',
|
||||
},
|
||||
|
||||
inner: {
|
||||
paddingHorizontal: 14,
|
||||
|
|
@ -78,6 +87,9 @@ const styles_mac = StyleSheet.create({
|
|||
fontSize: 13,
|
||||
color: '#eaeaea',
|
||||
},
|
||||
textLight: {
|
||||
color: '#0a0a0a',
|
||||
},
|
||||
});
|
||||
|
||||
function ButtonWindows(props: {
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ export default function DiscordSetup(props: DiscordSetupProps) {
|
|||
style={[styles.picker, theme.picker]}
|
||||
>
|
||||
{users.filter(u => u.nso).map(u => <Picker.Item
|
||||
key={u.user.id}
|
||||
label={u.user.nickname +
|
||||
(u.user.nickname !== u.nso!.nsoAccount.user.name ? '/' + u.nso!.nsoAccount.user.name : '')}
|
||||
value={u.user.id}
|
||||
|
|
@ -127,7 +128,7 @@ export default function DiscordSetup(props: DiscordSetupProps) {
|
|||
<Picker<string> selectedValue={selectedFriendNsaId ?? ''} onValueChange={setSelectedFriendNsaId}
|
||||
style={[styles.picker, theme.picker]}
|
||||
>
|
||||
{friends_with_presence.map(f => <Picker.Item label={f.name} value={f.nsaId} />)}
|
||||
{friends_with_presence.map(f => <Picker.Item key={f.nsaId} label={f.name} value={f.nsaId} />)}
|
||||
</Picker>
|
||||
</> : null}
|
||||
</> : null}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user