Skip to content

Commit 59e5a71

Browse files
fix(css): cover aspect-ratio and GUI search bar offset and Yes button dark theme (PR #2685 Fixes #2678 Fixes #2683)
1 parent 3acc25a commit 59e5a71

File tree

7 files changed

+31
-15
lines changed

7 files changed

+31
-15
lines changed

src/renderer/assets/styles/components/publications.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
word-break: break-all;
116116
display: -webkit-inline-box;
117117
-webkit-line-clamp: 3;
118+
line-clamp: 3;
118119
-webkit-box-orient: vertical;
119120
overflow: hidden;
120121
text-align: center;
@@ -532,6 +533,7 @@
532533
word-break: break-all;
533534
display: -webkit-inline-box;
534535
-webkit-line-clamp: 3;
536+
line-clamp: 3;
535537

536538
/* autoprefixer: ignore next */
537539
-webkit-box-orient: vertical;

src/renderer/assets/styles/components/readerHeader.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
.tts_toolbar {
4949
justify-content: center;
5050
position: relative;
51+
52+
@media screen and (width <= 850px) {
53+
margin-right: 10px;
54+
}
55+
5156
}
5257

5358
.menu_option {

src/renderer/assets/styles/publicationInfos.scss

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
border: 1px solid var(--color-blue);
5757
height: 25px;
5858
border-radius: 4px;
59-
padding: 2px;
59+
padding: 4px;
6060
width: 100%;
6161
display: flex;
6262
align-items: center;
@@ -76,23 +76,27 @@
7676
}
7777

7878
.publicationInfo_leftSide {
79+
// flex: 1;
7980
flex: 1;
80-
max-width: 35%;
8181
text-align: center;
82+
width: 100%;
8283

8384
&_coverWrapper {
84-
width: 100%;
85-
min-height: 350px;
8685
position: relative;
87-
display: flex;
8886
align-items: center;
8987
background-color: var(--color-extralight-grey);
9088
border: 1px solid var(--color-light-grey);
9189
border-radius: 6px;
90+
margin: auto;
91+
92+
img {
93+
min-height: 250px;
94+
height: 100%;
95+
min-width: 167px;
96+
}
9297

9398
.no_img_wrapper {
94-
height: 350px;
95-
width: 100%;
99+
aspect-ratio: 0.67;
96100
text-align: center;
97101
box-sizing: border-box;
98102
padding: 5%;
@@ -106,16 +110,17 @@
106110
border: 1px black solid;
107111
width: 100%;
108112
height: 100%;
109-
line-height: inital;
113+
line-height: initial;
110114
display: flex;
111115
flex-direction: column;
112116
justify-content: center;
113117
align-items: center;
114118

115119
& p {
116-
word-break: break-all;
120+
word-break: break-word;
117121
display: -webkit-inline-box;
118122
-webkit-line-clamp: 3;
123+
line-clamp: 3;
119124
-webkit-box-orient: vertical;
120125
overflow: hidden;
121126
text-align: center;
@@ -156,6 +161,7 @@
156161

157162
.book_title {
158163
font-size: 24px;
164+
overflow-wrap: anywhere;
159165
}
160166

161167
h2 {

src/renderer/common/components/ComboBox.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export interface MyComboBoxProps<T extends object>
2525
svg?: ISVGProps;
2626
refInputEl?: React.Ref<HTMLInputElement>;
2727
placeholder?: string;
28+
customWidth?: number;
2829
}
2930

3031
// function forwardRef<T extends object>(
@@ -56,17 +57,17 @@ export interface MyComboBoxProps<T extends object>
5657
// );
5758

5859
export function ComboBox<T extends object>(
59-
{ label, description, errorMessage, children, svg, refInputEl, placeholder, ...props }: MyComboBoxProps<T>,
60+
{ label, description, errorMessage, children, svg, refInputEl, placeholder, customWidth, ...props }: MyComboBoxProps<T>,
6061
) {
6162

6263
return (
63-
<ComboBoxReactAria {...props} className={StylesCombobox.react_aria_ComboBox}>
64+
<ComboBoxReactAria {...props} className={StylesCombobox.react_aria_ComboBox} style={{width: customWidth ? `${customWidth + 20}px` : ""}}>
6465
{
6566
label ?
6667
<Label className={StylesCombobox.react_aria_Label}>{label}</Label>
6768
: <></>
6869
}
69-
<Group className={classNames(StylesCombobox.my_combobox_container, "R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE")} >
70+
<Group className={classNames(StylesCombobox.my_combobox_container, "R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE")} style={{width: customWidth ? `${customWidth}px` : ""}}>
7071
{svg ? <SVG ariaHidden svg={svg} /> : <></>}
7172
<Input className={classNames(StylesCombobox.react_aria_Input, "R2_CSS_CLASS__FORCE_NO_FOCUS_OUTLINE")} ref={refInputEl} placeholder={placeholder} />
7273
{(!props.defaultItems || !!Array(...(props.defaultItems || [])).length) &&

src/renderer/common/components/dialog/publicationInfos/tag/AddTag.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class AddTag extends React.Component<IProps, IState> {
8383
inputValue={this.state.tagName}
8484
defaultInputValue={this.state.tagName}
8585
aria-labe={__("catalog.addTags")}
86+
customWidth={250}
8687
>
8788
{item => <ComboBoxItem>{item.name}</ComboBoxItem>}
8889
</ComboBox>

src/renderer/reader/components/Reader.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,9 @@ class Reader extends React.Component<IProps, IState> {
850850
: this.props.readerConfig.readerDockingMode === "right" ? !this.props.readerConfig.paged ? stylesReader.docked_right_scrollable : stylesReader.docked_right_pdf
851851
: ""
852852
) : undefined,
853-
(this.props.searchEnable && !this.props.isPdf) ? stylesReader.isOnSearch
854-
: (this.props.searchEnable && this.props.isPdf) ? stylesReader.isOnSearchPdf
853+
(this.props.searchEnable && !this.props.isPdf && this.props.readerConfig.paged) ? stylesReader.isOnSearch
854+
: (this.props.searchEnable && this.props.isPdf) ? stylesReader.isOnSearchPdf :
855+
(this.props.searchEnable && !this.props.readerConfig.paged) ? stylesReader.isOnSearchScroll
855856
: "")}
856857
ref={this.mainElRef}
857858
style={{ inset: isAudioBook || !this.props.readerConfig.paged || this.props.isPdf || this.props.isDivina ? "0" : "75px 50px" }}>

src/renderer/reader/components/ReaderHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ export class ReaderHeader extends React.Component<IProps, IState> {
724724
</button>
725725
</Popover.Trigger>
726726
<Popover.Portal>
727-
<Popover.Content>
727+
<Popover.Content style={{zIndex: 100}}>
728728
<div className={stylesReaderHeader.Tts_popover_container}>
729729
<div style={{paddingRight: "25px", borderRight: "1px solid var(--color-verylight-grey-alt)"}}>
730730
<div className={stylesReader.ttsSelectRate}>

0 commit comments

Comments
 (0)