I see these menu options for my asp.net project beneath the Web Essentials menu:
Create solution settings
Create color palette
Create markdown stylesheet
The official site for Web Essentials doesn't seem to be too forthcoming about just what these options do, or why. Can somebody give me the skinny?
Create solution settings - sets the settings file per solution.
Reason: Many of the options affect the generation of code. Those options should be able to be shared alongside the solution file so all members of a team automatically use the same settings. Also, if the settings are stored alongside the solution, they can be checked into version control.
Create color palette - WE reads and generates UI that shows your site's color pallete, from there you could just pick the colors instead of having to try to remember what the color codes are.
Create markdown stylesheet - I think this one is used for code samples, allows to specify a custom CSS file for the Markdown preview pane
Related
I can't find how to load my own icons in Flet.
I'm testing Flet with the intention of making a desktop app (pure desktop, not Internet needed), but I'm not able to use my own icons to begin with. I can only use the ones that come inside ft.icons, but I'd rather use my own by loading them from a folder similar to /assets/icons. Can I do that? How?
Thanks.
Currently, I don't see a way of doing this; however, you could use the Image class instead.
I would suggest you create an assets folder under your main project folder.
Let's assume you have the following folder structure on your project:
/assets
/icons/my-icon.png
main.py
When you are running your app, you should provide that folder to the initializer in the following way:
flet.app(target=YourApp(), assets_dir="assets")
Then you can access your images there directly and create an Image instance in the following way:
test_image = flet.Image(src="icons/my-icon.png", width=32, height=32, tooltip="Image Tooltip")
You can nest these Image controls inside of anything you want, so you have a lot of flexibility.
The only downside of doing it this way is if you are using light/dark themes on your app. Compared to the Icon class, you will have to specify the light/dark theme versions yourself and update them manually when you are switching your theme.
Here is the official documentation
How would i add a custom icon with a given name to my nativescript project using the tns resources generate icons-command
$tns resources generate icons ~/myfolder/myspecialicon.png
Say i want the command to place the icon(s) in the correct folders maintaining the name myspecialicon.xxx instead of just overwriting the default icon.png?
Cheers
Lasse
That only generates the app icon. To generate other icons (and other image assets, really) I recommend the online tool http://images.nativescript.rocks/.
It generates assets for both Android and iOS. All you have to do is grab the result and merge it into your project's App_Resources. I know it is not ideal but it's the best workflow I found so far.
The new Flat theme of QtCreator looks nice and I want to apply to my application.
I know how to use QApplication::setStyle() to set a theme, but I don't know if this new theme ships with Qt at all, and if it ships, what is its name.
I searched for the flat theme file in my Qt install, and I found it at c:\Qt\Tools\QtCreator\share\qtcreator\themes\flat.creatortheme.
The flat theming was added by
commit Implement theming for QtCreator.
Here's the commit message:
Implement theming for QtCreator
Adds a 'Theme' tab to the environment settings and a '-theme' command
line option.
A theme is a combination of colors, gradients, flags and style
information.
There are two themes:
- 'default': preserves the current default look
- 'dark': uses a more flat for many widgets, dark color theme
for everything
This does not use a stylesheet (too limited), but rather sets
the palette via C++ and modifies drawing behavior.
Overall, the look is more flat (removed some gradients and bevels).
Tested on Ubuntu 14.04 using Qt 5.4 and running on a KDE
Desktop (Oxygen base style).
For a screenshot, see
https://gist.github.com/thorbenk/5ab06bea726de0aa7473
Changes:
- Introduce class Theme, defining the interface how to access theme
specific settings. The class reads a .creatortheme file (INI file, via
QSettings)
- Define named colors in the [Palette] section
(see dark.creatortheme for example usage)
- Use either named colors of AARRGGBB (hex) in the [Colors]
section
- A file ending with .creatortheme may be supplied
to the '-theme' command line option
- A global Theme instance can be accessed via creatorTheme()
- Query colors, gradients, icons and flags from the theme
were possible (TODO: use this in more places...)
- There are very many color roles. It seems better to me
to describe the role clearly, and then to consolidate later
in the actual theme by assigning the same color.
For example, one can set the text color of the output pane button
individualy.
- Many elements are also drawn differently.
For the dark theme, I wanted to have a flatter look.
- Introduce Theme::WidgetStyle enum, for now {Original, Flat}.
- The theme specifies which kind of widget style it wants.
- The drawing code queries the theme's style flag and
switches between the original, gradient based look and
the new, flat look.
- Create some custom icons which look better on dark background
(wip, currently folder/file icons)
- Let ManhattanStyle draw some elements for non-panelwidgets, too
(open/close arrows in QTreeView, custom folder/file icons)
- For the welcomescreen, pass the WelcomeTheme class.
WelcomeTheme exposes theme colors as Q_PROPERTY accessible from
.qml
- Themes can be modified via the 'Themes' tab in the environment
settings.
TODO:
* Unify image handling
* Avoid style name references
* Fix gradients
Change-Id: I92c2050ab0fb327649ea1eff4adec973d2073944
Reviewed-by: Thomas Hartmann
Reviewed-by: hjk
I have no experience with QML, but maybe the file is all you need, I don't know.
Check in src/libs/utils/theme/theme.cpp. It will probably be some work to extract that and generalize it for other applications.
I would like to make a number of suggestions to CSS edits for a page and am using Chrome Developer Tools to modify the page elements. I was wondering if there is any way that I am able to get CDT to save just the modifications that I have made into a single css stylesheet as a kind of summary?
I know that I am able to create a workspace and map a hosted css file to a local file, however, from what I can gather, this just uses your local file in place of the hosted file and does not give me a summary of the specific changes that I've made. Any suggestions?
My goal is to have more themes for my application and if possible, bundle them with the application itself, not load them at runtime using IStyleManager.loadStyleDeclarations().
Using the theme command-line option, you can have more than one "compile-time theme" bundled with your application according to docs:
theme filename [...] Specifies a list of theme files to use with this application. Theme files can be SWC files with CSS files inside them or CSS files.
However, I wasn't able to find an example how to actually do that (use the += syntax on command line?) and switch between those themes at runtime. What API should I use?
Using the theme command-line option, you can have more than one
"compile-time theme" bundled with your application according to docs:
Yes, You can add additional themes using the += in your command line.
I do exactly this for the Flextras mobile demos; including both the generic Spark theme with the Mobile theme to create the app.
However, both themes will be attempted to be used. I believe the second takes precedence. That means for every class where you want to use the "other theme" you have to specify that theme be used manually. This could get pretty complex very quickly; and you'll have to re-create a lot of spark skins in your application. I've done some work for a client around this who wanted to use our mobile DropDownList in both their normal application and in a mobile application from the same code base. I think the appropriate skin is conditionally applied at runtime using CSS; however we had to create a skin for the "non-mobile use" that explicitly specified the non-mobile skins for the individual elements (Such as the scroll bars)