Skip to content

Commit

Permalink
Merge pull request #10044 from DestinyItemManager/subclass-tweaks
Browse files Browse the repository at this point in the history
LO: Subclass/mod tweaks
  • Loading branch information
bhollis authored Nov 6, 2023
2 parents 8ec6b42 + 3d78e1e commit 8fb6c0e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 10 deletions.
12 changes: 9 additions & 3 deletions src/app/loadout-builder/LoadoutBuilder.m.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@
background-color: rgba(0, 0, 0, 0.4);
padding: 8px;
gap: 0;
// Fit 5 mods across, regardless of what the user's item size is
--item-size: 47px;
--loadout-edit-subclass-columns: 4;
// Fit 7 mods across, regardless of what the user's item size is
--item-size: 50px;
--loadout-edit-subclass-columns: 7;
}

.subclassSection {
composes: loadoutEditSection;
// Adjust these down a bit
--item-size: 48px;
}
1 change: 1 addition & 0 deletions src/app/loadout-builder/LoadoutBuilder.m.scss.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/loadout-builder/LoadoutBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export default memo(function LoadoutBuilder({
store={selectedStore}
subclass={subclass}
setLoadout={setLoadout}
className={styles.loadoutEditSection}
className={styles.subclassSection}
/>
<LoadoutOptimizerPinnedItems
chooseItem={chooseItem}
Expand Down
16 changes: 16 additions & 0 deletions src/app/loadout/loadout-edit/LoadoutEditSubclass.m.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@
composes: resetButton from '../../dim-ui/common.m.scss';
height: 100%;
width: 100%;
position: relative;
display: flex;
align-items: center;
justify-content: center;
> * {
position: absolute;
}

color: #999;
&:hover,
&:focus-visible {
color: white;
rect {
stroke: var(--theme-accent-primary);
}
}
}

.missingItem {
Expand Down
10 changes: 8 additions & 2 deletions src/app/loadout/loadout-edit/LoadoutEditSubclass.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ItemPopupTrigger from 'app/inventory/ItemPopupTrigger';
import { storesSelector } from 'app/inventory/selectors';
import { ResolvedLoadoutItem } from 'app/loadout-drawer/loadout-types';
import { useD2Definitions } from 'app/manifest/selectors';
import { AppIcon, powerActionIcon } from 'app/shell/icons';
import { AppIcon, addIcon, powerActionIcon } from 'app/shell/icons';
import { DestinyClass } from 'bungie-api-ts/destiny2';
import clsx from 'clsx';
import { BucketHashes, SocketCategoryHashes } from 'data/d2/generated-enums';
Expand Down Expand Up @@ -80,8 +80,14 @@ export default function LoadoutEditSubclass({
</ItemPopupTrigger>
</ClosableContainer>
) : (
<button className={styles.classButton} type="button" onClick={onPick}>
<button
className={styles.classButton}
type="button"
onClick={onPick}
title={t('Loadouts.ChooseItem', { name: t('Bucket.Class') })}
>
<EmptySubclass border />
<AppIcon icon={addIcon} />
</button>
)}
{power !== 0 && (
Expand Down
6 changes: 2 additions & 4 deletions src/app/loadout/loadout-ui/LoadoutMods.m.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@
height: var(--item-icon-size);
width: var(--item-icon-size);

&:focus {
&:hover,
&:focus-visible {
border-color: var(--theme-accent-primary);
}

&:hover {
color: white;
}
}
Expand Down

0 comments on commit 8fb6c0e

Please sign in to comment.