aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-11-02 00:08:26 -0400
committerGitHub <[email protected]>2021-11-02 00:08:26 -0400
commit752e515a1ca4f4d1b068bf50a645f7ffab73d01f (patch)
tree5edc7e0ff0ded7b144eeff6474d27f9ce572bac6
parentca0f68bb7d36a11a881177d79875dd218a3c2688 (diff)
parent41be51b3847ad68185ca3fa139a1f439ac61b4c0 (diff)
downloadSponsorBlock-3.5.2.tar.gz
SponsorBlock-3.5.2.zip
Merge pull request #1018 from FlorianZahn/fontSizeFixTooltip3.5.2
Makes rectangleTooltip fontSize bigger
-rw-r--r--src/components/SponsorTimeEditComponent.tsx6
-rw-r--r--src/render/RectangleTooltip.tsx5
2 files changed, 8 insertions, 3 deletions
diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx
index 72d3e44f..144f3c82 100644
--- a/src/components/SponsorTimeEditComponent.tsx
+++ b/src/components/SponsorTimeEditComponent.tsx
@@ -292,11 +292,13 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
referenceNode: element.parentElement,
prependElement: element,
timeout: 15,
- bottomOffset: 75 + "px",
+ bottomOffset: 0 + "px",
leftOffset: -318 + "px",
backgroundColor: "rgba(28, 28, 28, 1.0)",
htmlId: "sponsorTimesContainer" + this.idSuffix,
- buttonFunction: () => {Config.config.scrollToEditTimeUpdate = true}
+ buttonFunction: () => { Config.config.scrollToEditTimeUpdate = true },
+ fontSize: "14px",
+ maxHeight: "200px"
});
}
}
diff --git a/src/render/RectangleTooltip.tsx b/src/render/RectangleTooltip.tsx
index d08e260e..1887cbbc 100644
--- a/src/render/RectangleTooltip.tsx
+++ b/src/render/RectangleTooltip.tsx
@@ -13,6 +13,7 @@ export interface RectangleTooltipProps {
maxHeight?: string,
maxWidth?: string,
backgroundColor?: string,
+ fontSize?: string,
buttonFunction?: () => void;
}
@@ -29,6 +30,7 @@ export class RectangleTooltip {
props.maxWidth ??= "300px";
props.backgroundColor ??= "rgba(28, 28, 28, 0.7)";
this.text = props.text;
+ props.fontSize ??= "10px";
this.container = document.createElement('div');
props.htmlId ??= props.text;
@@ -51,7 +53,8 @@ export class RectangleTooltip {
left: props.leftOffset,
maxHeight: props.maxHeight,
maxWidth: props.maxWidth,
- backgroundColor: props.backgroundColor}}
+ backgroundColor: props.backgroundColor,
+ fontSize: props.fontSize}}
className="sponsorBlockRectangleTooltip" >
<div>
<img className="sponsorSkipLogo sponsorSkipObject"