Skip to content

Commit

Permalink
- ThemeCollection: correctly map office document color
Browse files Browse the repository at this point in the history
- change officeFileFillColor to documentFileFillColor
  • Loading branch information
felix-schwarz committed Nov 3, 2023
1 parent 166a514 commit 9a4fc65
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion img/filetypes-tvg/x-office-document.tvg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"defaults":{"officeFileFillColor":"#49abea"},"image":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns:rdf=\"http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" height=\"16\" width=\"16\" version=\"1.0\" xmlns:cc=\"http:\/\/creativecommons.org\/ns#\" xmlns:dc=\"http:\/\/purl.org\/dc\/elements\/1.1\/\">\n <path style=\"color:#000000;block-progression:tb;text-transform:none;text-indent:0\" d=\"m2.3496 1.002c-0.1975 0.0382-0.3531 0.2333-0.3496 0.4375v13.122c0 0.23 0.2061 0.438 0.4316 0.438h11.138c0.226 0 0.432-0.208 0.432-0.438v-10.142c-0.004-0.0669-0.023-0.133-0.055-0.1915l-3.312-3.1992c-0.043-0.0164-0.089-0.0255-0.135-0.0273h-8.0684c-0.0268-0.00265-0.0552-0.00265-0.082 0zm1.6504 1.998h6v1h-6v-1zm0 3h5v1h-5v-1zm0 3h8v1h-8v-1zm0 3h4v1h-4v-1z\" fill=\"{{officeFileFillColor}}\"\/>\n<\/svg>\n","viewBox":"{{0, 0}, {16, 16}}"}
{"defaults":{"documentFileFillColor":"#49abea"},"image":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns:rdf=\"http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" height=\"16\" width=\"16\" version=\"1.0\" xmlns:cc=\"http:\/\/creativecommons.org\/ns#\" xmlns:dc=\"http:\/\/purl.org\/dc\/elements\/1.1\/\">\n <path style=\"color:#000000;block-progression:tb;text-transform:none;text-indent:0\" d=\"m2.3496 1.002c-0.1975 0.0382-0.3531 0.2333-0.3496 0.4375v13.122c0 0.23 0.2061 0.438 0.4316 0.438h11.138c0.226 0 0.432-0.208 0.432-0.438v-10.142c-0.004-0.0669-0.023-0.133-0.055-0.1915l-3.312-3.1992c-0.043-0.0164-0.089-0.0255-0.135-0.0273h-8.0684c-0.0268-0.00265-0.0552-0.00265-0.082 0zm1.6504 1.998h6v1h-6v-1zm0 3h5v1h-5v-1zm0 3h8v1h-8v-1zm0 3h4v1h-4v-1z\" fill=\"{{documentFileFillColor}}\"\/>\n<\/svg>\n","viewBox":"{{0, 0}, {16, 16}}"}
2 changes: 1 addition & 1 deletion img/filetypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"description" : "Fill color used in office document",

"replace" : "#49abea",
"variable" : "officeFileFillColor"
"variable" : "documentFileFillColor"
},
"fill=\"#f0965f\"" : {
"description" : "Fill color used in presentation document",
Expand Down
2 changes: 1 addition & 1 deletion ownCloudAppShared/Branding/Branding+App.swift
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ extension Branding {

case .fileIconColor:
addCSSRecord([.vectorImage, .fileColor], property: .fill, value: value)
addCSSRecord([.vectorImage, .officeFileColor], property: .fill, value: value)
addCSSRecord([.vectorImage, .documentFileColor], property: .fill, value: value)
addCSSRecord([.vectorImage, .presentationFileColor], property: .fill, value: value)
addCSSRecord([.vectorImage, .spreadsheetFileColor], property: .fill, value: value)
addCSSRecord([.vectorImage, .pdfFileColor], property: .fill, value: value)
Expand Down
4 changes: 2 additions & 2 deletions ownCloudAppShared/User Interface/Theme/ThemeCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ public class ThemeCollection : NSObject {
_iconColors?["folderFillColor"] = css.getColor(.fill, selectors: [.vectorImage, .folderColor], for: nil)?.hexString()

_iconColors?["fileFillColor"] = css.getColor(.fill, selectors: [.vectorImage, .fileColor], for: nil)?.hexString()
_iconColors?["officeFillColor"] = css.getColor(.fill, selectors: [.vectorImage, .officeFileColor], for: nil)?.hexString()
_iconColors?["documentFileFillColor"] = css.getColor(.fill, selectors: [.vectorImage, .documentFileColor], for: nil)?.hexString()
_iconColors?["presentationFileFillColor"] = css.getColor(.fill, selectors: [.vectorImage, .presentationFileColor], for: nil)?.hexString()
_iconColors?["spreadsheetFileFillColor"] = css.getColor(.fill, selectors: [.vectorImage, .spreadsheetFileColor], for: nil)?.hexString()
_iconColors?["pdfFileFillColor"] = css.getColor(.fill, selectors: [.vectorImage, .pdfFileColor], for: nil)?.hexString()
Expand All @@ -804,7 +804,7 @@ public class ThemeCollection : NSObject {
extension ThemeCSSSelector {
static let folderColor = ThemeCSSSelector(rawValue: "folderColor")
static let fileColor = ThemeCSSSelector(rawValue: "fileColor")
static let officeFileColor = ThemeCSSSelector(rawValue: "officeFileColor")
static let documentFileColor = ThemeCSSSelector(rawValue: "documentFileColor")
static let presentationFileColor = ThemeCSSSelector(rawValue: "presentationFileColor")
static let spreadsheetFileColor = ThemeCSSSelector(rawValue: "spreadsheetFileColor")
static let pdfFileColor = ThemeCSSSelector(rawValue: "pdfFileColor")
Expand Down

0 comments on commit 9a4fc65

Please sign in to comment.