Open
Bug 801407
Opened 13 years ago
Updated 3 years ago
PDF.js should be themeable.
Categories
(Firefox :: PDF Viewer, enhancement, P3)
Firefox
PDF Viewer
Tracking
()
NEW
People
(Reporter: alfredkayser, Unassigned)
Details
(Keywords: ux-consistency, Whiteboard: [pdfjs-feature])
Attachments
(1 file, 3 obsolete files)
2.43 KB,
patch
|
yury
:
review-
|
Details | Diff | Splinter Review |
Currently, the toolbars and buttons of PDF.js cannot be themed, as they provide their own stylesheets outside chrome://*/skin/...
This makes it impossible to style these toolbars and buttons in the same style as the rest of the browser for custom themes (such as Walnut and Nautipolis).
Please, place the PDF.js stylesheets in chrome://pdfjs/skin/ so that we can style it.
Thanks!
Reporter | ||
Comment 1•13 years ago
|
||
In short:
move viewer.css and corr. images to chrome://pdf.js/skin/
and change the reference resource://pdf.js/web/viewer.css to chrome://pdf.js/skin/viewer.css.
Updated•13 years ago
|
Priority: -- → P3
Whiteboard: [pdfjs-c-feature]
Reporter | ||
Updated•13 years ago
|
Assignee: nobody → alfredkayser
OS: Windows 7 → All
Hardware: x86_64 → All
Reporter | ||
Comment 2•13 years ago
|
||
Reporter | ||
Updated•13 years ago
|
Summary: Toolbar, buttons, sidebar of PDF.js should be themeable. → PDF.js should be themeable.
Reporter | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
Keywords: ux-consistency
Comment 3•13 years ago
|
||
Instead of moving default resource://pdf.js/web/viewer.css create empty/default one in chrome://pdfjs/skin/ . That will avoid code duplication for different skins and let authors to "extend" stylesheet vs creating new one. (btw, main repo is located at https://github.com/mozilla/pdf.js)
Updated•13 years ago
|
Attachment #716002 -
Flags: feedback-
Reporter | ||
Comment 4•12 years ago
|
||
Note, this solution is also used in for example aboutMemory.css.
Attachment #716002 -
Attachment is obsolete: true
Attachment #716996 -
Flags: review?(ydelendik)
Reporter | ||
Comment 5•12 years ago
|
||
Attachment #716996 -
Attachment is obsolete: true
Attachment #716996 -
Flags: review?(ydelendik)
Attachment #717072 -
Flags: review?(ydelendik)
Reporter | ||
Comment 6•12 years ago
|
||
Attachment #717072 -
Attachment is obsolete: true
Attachment #717072 -
Flags: review?(ydelendik)
Attachment #717077 -
Flags: review?(ydelendik)
Comment 7•12 years ago
|
||
Comment on attachment 717077 [details] [diff] [review]
V4: Oops wrong patch attacted, this is the right one
Review of attachment 717077 [details] [diff] [review]:
-----------------------------------------------------------------
The files you are modifying are automatically generated using https://github.com/mozilla/pdf.js/blob/master/make.js#L434 script. Please submit your changes to the mozilla/pdf.js repo first.
::: browser/extensions/pdfjs/content/web/viewer.html
@@ +19,5 @@
> <meta charset="utf-8">
> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
> <title>PDF.js viewer</title>
>
> + <!-- This snippet is used in firefox extension, see Makefile -->
This code was automatically inserted by build script. Also, this change is irrelevant to the issue.
@@ +27,2 @@
>
> + <link rel="stylesheet" href="chrome://pdf.js/skin/viewer.css"/>
The same. Keep it viewer.css
::: browser/extensions/pdfjs/extension-files
@@ +36,5 @@
> content/web/images/toolbarButton-zoomOut.png
> content/web/l10n.js
> content/web/viewer.css
> content/web/viewer.html
> +skin/viewer.css
Why you are removing viewer.js? This file is automatically generated
::: browser/extensions/pdfjs/skin/viewer.css
@@ +1,1 @@
> +@import url("resource://pdf.js/web/viewer.css");
Please add additional <link> tag to the https://github.com/mozilla/pdf.js/blob/master/web/viewer-snippet-firefox-extension.html (which will be included to viewer.html) and don't use @import.
Attachment #717077 -
Flags: review?(ydelendik) → review-
Comment 9•10 years ago
|
||
Actually, the theme can be decided through CSS. I was be able to change the PDF.JS theme by modifying the CSS. The thing we need is to allow CSS editing through special directory. If this is happen, my custom PDF.JS theme would be installed on Firefox.
Reporter | ||
Comment 10•10 years ago
|
||
(In reply to reinhart_previano from comment #9)
> Actually, the theme can be decided through CSS. I was be able to change the
> PDF.JS theme by modifying the CSS. The thing we need is to allow CSS editing
> through special directory. If this is happen, my custom PDF.JS theme would
> be installed on Firefox.
See comment #1.
As for comment #8: I get lost in the PDF.js repository on how to fix this.
Aparently, in https://github.com/mozilla/pdf.js/blob/master/web/viewer.html
one should replace viewer.css with something link chrome://pdfjs/skin/viewer.css,
and package this viewer.css and images so that chrome://pdfjs/skin can find it.
Updated•4 years ago
|
Type: defect → enhancement
Updated•4 years ago
|
Severity: normal → --
Updated•4 years ago
|
Whiteboard: [pdfjs-c-feature] → [pdfjs-feature]
Comment 11•4 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:bdahl, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: alfredkayser → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(bdahl)
Updated•3 years ago
|
Flags: needinfo?(bdahl)
You need to log in
before you can comment on or make changes to this bug.
Description
•