Copying and Modifying a Default Theme

Copying and modifying a default theme

the wiki suggests one way to do this using modifyList,

theme_new <- function (base_size = 12, base_family = "", ...){
modifyList (theme_bw (base_size = base_size, base_family = base_family),
list (axis.title.x = theme_text(family = base_family,
size = base_size, vjust = 0.5)))
}

How to modify the default control themes?

Okay, I found the solution for this. I hope this helps someone else.

Update your App.xaml

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="{ThemeDictionary AssemblyName=AssemblyWithThemes}"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
<!-- other styles go here -->
</Application.Resources>

where AssemblyWithThemes is the name of the assembly that contains the Themes\ folder with the theme files. I believe the assembly needs to be referenced from your application as well.

Very important, if including additional resources directly in the App.xaml file, place them where the comment is above, otherwise the containing ResourceDictionary becomes another resource instead of setting the Application.Resources property.

Then, all additional styles need to specify the BasedOn attribute to preserve the theme changes. For dynamically created windows, I used new Style(Type) and it prevented the overridden theme from being used. After changing to new Style(Type, Style), it worked perfectly.

How to reset jupyter notebook theme to default?

My previous suggestion of deleting the custom/ directory doesn't do the trick. jupyter caches the custom.css file in other directories that are tricky to clear all together. If it doesn't find a folder custom with .css file inside it it looks in other locations to pick up a .css file.
Also, I'm not sure if every location is actually deleted when you uninstall jupyter.

The easiest solution is to delete the old custom.css and replace it with a new empty custom.css file. jupyter picks that up and goes back to its default look.

How to modify Vuetify default theme?

You can edit the dark and light theme css by going into the vuetify code and editing their style files. They use stylus and any edits should be reflected immediately. To find the style code go to:

yourproject/node_modules/vuetify/src/stylus/settings/_theme.styl

and in there you'll find

$material-light := {
...
}

and

$material-dark := {
...
}

which have the styling for background, fonts, cards, etc.

You should be able to edit it as you see fit.

Otherwise to save editing your node modules folder you can do the following:

  1. create a folder called stylus in your src folder

  2. create a file called main.styl

  3. add this to that file: @import '~vuetify/src/stylus/main'

  4. Then in your main.js add this import './stylus/main.styl

  5. If you then restart your app the styles should now be working from your import.

  6. Edit your src/main.styl file before the import statement and any changes will override the default

eg:

//src/stylus/main.styl
$material-light.background = #36EF45
$body-font-family = 'Raleway'
$alert-font-size = 18px

@import '~vuetify/src/stylus/main'

Anything you don't change will stay with the default.

How to modify the android 4.2 default theme?

The android manifest.xml has the attribut android:theme="resource or theme". This attribut sets it to holo dark or light or your own declared theme. To use your own layout you msut declare and build your own layout in the res/values folder.

Here's the documentation about it: http://developer.android.com/guide/topics/manifest/application-element.html



Related Topics



Leave a reply



Submit