-
Notifications
You must be signed in to change notification settings - Fork 43
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
Thumbnail make boxes same size #1210
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ import { useTheme } from "../themes"; | |
|
||
import { backgroundBoxStyle, flexGapReplacementStyle } from '../cssStyles' | ||
|
||
const VideoPlayers: React.FC<{refs: any, widthInPercent?: number}> = ({refs, widthInPercent = 100}) => { | ||
const VideoPlayers: React.FC<{refs: any, widthInPercent?: number, maxHeightInPixel?: number}> = ({refs, widthInPercent = 100, maxHeightInPixel = 300}) => { | ||
|
||
const videoURLs = useSelector(selectVideoURL) | ||
const videoCount = useSelector(selectVideoCount) | ||
|
@@ -37,7 +37,7 @@ const VideoPlayers: React.FC<{refs: any, widthInPercent?: number}> = ({refs, wid | |
borderRadius: '5px', | ||
...(flexGapReplacementStyle(10, false)), | ||
|
||
maxHeight: '300px', | ||
maxHeight: maxHeightInPixel + 'px', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Editor is also using emotion-js, right? You should be able to just pass integers here. Also the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does use Emotion, but not emotion-js specifically I think? Anyway, I like being specific about my units :D |
||
}); | ||
|
||
// Initialize video players | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This magic number depends on the width of the buttons. If a button is hidden (like in #1208), the width changes.
So this should likely have a different solution. Maybe both boxes just get a fixed width. Or something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welp, that teaches me to not go for the quick and dirty solution. I'll see if I can get a proper solution working, but that'll require some time.