1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-29 02:34:06 +02:00

Make theme-based color tweaks in edit-design plugin optional

This commit is contained in:
chylex 2017-05-16 02:13:48 +02:00
parent e44f4bb003
commit dc76ae9d1f
2 changed files with 18 additions and 9 deletions
Resources/Plugins/edit-design

View File

@ -16,6 +16,7 @@ enabled(){
hideTweetActions: true, hideTweetActions: true,
moveTweetActionsToRight: true, moveTweetActionsToRight: true,
revertReplies: false, revertReplies: false,
themeColorTweaks: true,
roundedScrollBars: false, roundedScrollBars: false,
smallComposeTextSize: false, smallComposeTextSize: false,
optimizeAnimations: true, optimizeAnimations: true,
@ -320,9 +321,12 @@ enabled(){
this.css.insert(".txt-base-smallest:not(.icon), .txt-base-largest:not(.icon) { font-size: "+this.config.fontSize+" !important }"); this.css.insert(".txt-base-smallest:not(.icon), .txt-base-largest:not(.icon) { font-size: "+this.config.fontSize+" !important }");
this.css.insert(".avatar { border-radius: "+this.config.avatarRadius+"% !important }"); this.css.insert(".avatar { border-radius: "+this.config.avatarRadius+"% !important }");
if (this.config.themeColorTweaks){
switch(TD.settings.getTheme()){ switch(TD.settings.getTheme()){
case "dark": case "dark":
this.css.insert(".app-content, .app-columns-container { background-color: #444448 }"); this.css.insert(".app-content, .app-columns-container { background-color: #444448 }");
this.css.insert(".column-drag-handle { opacity: 0.5 }");
this.css.insert(".column-drag-handle:hover { opacity: 1 }");
break; break;
case "light": case "light":
@ -330,6 +334,7 @@ enabled(){
this.css.insert(".app-columns-container.scroll-styled-h::-webkit-scrollbar-thumb:not(:hover) { background-color: #a5aeb5 }"); this.css.insert(".app-columns-container.scroll-styled-h::-webkit-scrollbar-thumb:not(:hover) { background-color: #a5aeb5 }");
break; break;
} }
}
if (this.config.hideTweetActions){ if (this.config.hideTweetActions){
this.css.insert(".tweet-action { opacity: 0; }"); this.css.insert(".tweet-action { opacity: 0; }");

View File

@ -98,6 +98,10 @@
<label class="txt-uppercase touch-larger-label"> <label class="txt-uppercase touch-larger-label">
<b>Design</b> <b>Design</b>
</label> </label>
<label class="checkbox">
<input data-td-key="themeColorTweaks" class="js-theme-checkbox touch-larger-label" type="checkbox">
Theme color tweaks
</label>
<label class="checkbox"> <label class="checkbox">
<input data-td-key="roundedScrollBars" class="js-theme-checkbox touch-larger-label" type="checkbox"> <input data-td-key="roundedScrollBars" class="js-theme-checkbox touch-larger-label" type="checkbox">
Rounded scroll bars Rounded scroll bars