Changes to skin in SDK path not taking effect? - apache-flex

I'm using the SparkChromeWindowedApplicationSkin in my Window Application and I'm making changes to the skin in the SDK directory but none of my changes are taking effect.
I set the skin in my CSS like this:
s|WindowedApplication
{
backgroundAlpha: 1;
backgroundColor: #FFFFFF;
resizeAffordanceWidth: 6;
skinClass: ClassReference("spark.skins.spark.SparkChromeWindowedApplicationSkin");
}
Then I control + click on the skin name and it opens the file. I then change some of the styles and properties. I then run the application. None of my changes seem to make a difference.
UPDATE: I just typed random gibberish into the skin and no errors were thrown. So I know it's not using the changes.

I copied the skins out of the SDK directory and placed them into my project folder. I placed them the same package / folder path as they had in the SDK and copied the assets to the root of my project folder (same path again). This worked! I'm still curious to know if this is the way everyone else does it and why the changes to the skins in the SDK did not update with my changes. Here is a screenshot of my project src directory now:

Related

Where to store css style sheet for sbt ScalaFX project

Does anyone know where in an sbt directory structure ScalaFX looks for CSS style sheets? I've tried putting them in the same directory as my ScalaFX app main file, in a resources directory, directly in src, and pretty much everywhere else - yet every time I get a message saying Resource "whatever path I'm using/style.css" not found.
In SBT project you put CSS stylesheets in src/main/resources
You can see an example project using CSS here https://github.com/scalafx/scalafx-ensemble
Assuming that your stylesheet is in src/main/resources/path/my.css you can load it like this
scene = new Scene {
stylesheets += this.getClass.getResource("/path/my.css").toExternalForm
...
}

Is there any way to open local file directly from 'Elements > Styles' tab in Chrome devtools?

I'm using the Chrome devtools persistence feature with browser-sync and sass.
I set a Workspace pointing to my scss folder and I can edit scss files from Chrome and have all css files created correctly, applied to browser real-time and saved in hard drive.
However when I select an element on the Elements > Styles tab and make some changes, the changed file is the http://localhost:3000... one so changes are not kept. Then I still have to find the local file in the Sources tab to copy these changes.
I'm not sure if this is the best we can get but if we could either open the local file directly from the Elements > Style tab instead of the http://localhost:3000... file or somehow automatically copy any changes in the http://localhost:3000... file to local file the workflow would be even easier and faster.
Does any one knows how to accomplish that, even using some app/extension?
UPDATE:
From Rohit answer I found that if I turn off css source maps in devtools settings then it is correctly synced, showing the green circle on the Elements > Style and keep my changes, although it still pointing to http://localhost:3000...style.css file.
However then it only changes this file, not the specific partials/*.scss file and if I run sass compiler it overrides the css with the old code.
With the css source maps on Chrome finds my partial scss correctly but doesn't show the green circle so it's not synced and doesn't keep changes.
The problem seems to be with syncing scss files instead of css.
I was trying with a Workspace pointing to my root scss folder, also tried pointing it to the direct parent of the file beeing edited and still not syncing corretly.
This is a shot in the dark but,I beleive if you add the parent folder of the files you are working on from Devtools > Sources Tab > Filesystem tab > Add folder to workspace.
Like so :
Then navigate to your folder, and add reload the page. After reloading if you see green
like so:
It means it is synced and will update without you going to the sources tab.
Adding the root of my project to the Workspace synced scss files correctly. Now when I click an element on the Element > Styles tab, Quick source opens the right file at the right scss rule but doesn't follow my changes in the Element > Styles tab (as it does using pure css) and I still need to copy changes to Quick source or edit there directly, save and wait sass compilation to apply changes on screen.
The workflow is much easier now but I'm not choosing this as the correct anwser because is not "as live as css" yet and maybe someone knows how to do this final step.
PS: browser-sync is not needed in this setup, just something to compile sass and Chrome apply changes automatically.

How to add the path of images in a QML project correctly

I'm going to practice this example and for that I created a Qt Quick Console 2 Application project named Main2 using Qt Creator 4.3.0 on a windows 7 machine.
The code for main.qml looks like this:
and I get the following errors in the Application Output window:
The program has unexpectedly finished.
C:\Users\Abbasi\Documents\QML\Main2\Main2\build-Main2-Desktop_Qt_5_9_0_MinGW_32bit-Debug\debug\Main2.exe crashed.
Starting C:\Users\Abbasi\Documents\QML\Main2\Main2\build-Main2-Desktop_Qt_5_9_0_MinGW_32bit-Debug\debug\Main2.exe...
QML debugging is enabled. Only use this in a safe environment.
What is the problem with the paths or anything please?
The images are in a folder named images on the Desktop. How to move them to a folder under the project, a step-by-step means please?
copy the images folder to your project folder
right click on your project - add new - Qt - resource file - images.qrc
right click on that - add existing files, goto /images and select what you want to add
alternatively, you can directly use the "add existing directory" option to add all files in a directory
Then from QML you simply:
Image { source: "images/whatever.jpg" }
This way the images are neatly packed inside your executable. Which is OK in most cases, unless you have gigabytes of images. It also helps prevent people replacing your stock images with profane versions ;)
Creating a separate resource file for images will do wonders for your build times.
If you are that keen on file system access, be that absolute (please don't do that ever in production) or relative, you will have to prepend a file:// to the path to tell Qt you want the file system rather than internal resources.
Update: As revealed by your main.cpp file, the actual problem is you are using a project template that uses QQmlApplicationEngine. The tutorial you are following dates back to the days before that, and uses QQuickView. The latter can have any QML element as a root, but the former needs to have an ApplicationWindow, which is the reason you are not getting any output. So you need to wrap your existing code in an ApplicationWindow:
ApplicationWindow {
visible: true
width: 640
height: 480
// your code goes here
}
use qrc: with image URL might work
Image { source: "qrc:images/whatever.jpg" }

CSS Changes, Updates in ASP.NET Theme Does Not Show Up

I thought it may be cached, but for some reason that I don't know the changes I make in CSS file that is located in application theme does not show up. If I take that change and put in a CSS file outside of theme folder, let's root or a new folder, it does show up. This is a ASP.NET 4.0 application. Not sure where to look for the solution. Please advise.
Don't just put the Theme folder, create a sub folder and put under it. It is better to name both sub-folder and css file same.

DotNetNuke Skinning: How do I use\add skin.css?

I'm just getting started DNN skinning and am confused by how skin.css works. I'm using the "legacy" skinning method, so my skin folder has SkinName.htm file in it, which I get DNN to parse each time I change it. Now I want to add some css...
According to this: (and various other references I've come across)
DotNetNuke Skinning
I should just need to add a skin.css file in my skin folder and the DNN framework should automatically add a reference to it.
But I've added a skin.css, containing the following:
.Head
{
color: Green;
}
which definitely doesn't make it to my final page; checked with firebug. Nothing like color: Green is being applied to my elements with class="Head"
Anybody have any suggestions on why my skin.css might be ignored? Does the current DNN version still work in this way? Anything obvious I should look at?
All you need is a skin.css file in your skinning directory the reference will be automatically added.
However, when developing a skin, if you first click "Parse Skin Package" when there is no skin.css file in the directory, it will be ignored after it is created. The easiest solution is to copy all your skin files to a new skin directory and re-parse the skin package.

Resources