Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please, add metro-fluent titled-pane dark and light styles. #25

Closed
MairwunNx opened this issue Dec 23, 2018 · 21 comments
Closed

Please, add metro-fluent titled-pane dark and light styles. #25

MairwunNx opened this issue Dec 23, 2018 · 21 comments

Comments

@MairwunNx
Copy link
Contributor

I created styles for titled-pane light and dark. Please, review my adds on titled-pane, maybe you like it :)

Also please, check css code style, i newbie in kotlin and css, i can be produce mistakes, but i try not-make mistakes :D

titled-pane

Changes in JMetroBase.css: (Summary screen)

image

Code of changes in JMetroBase.css:

/*******************************************************************************
 *                                                                             *
 * TitledPane (Expanded and unexpanded)                                        *
 *                                                                             *
 ******************************************************************************/

/* titled pane expanded & unexpanded disabled */
.titled-pane:disabled {
    -fx-opacity: 0.7;
}

/* titled pane expanded & unexpanded */
.titled-pane:expanded, .titled-pane .title {
    -fx-border-width: 1;
    -fx-border-color: accent_color;
}

/* titled pane expanded & unexpanded header */
.titled-pane:expanded .title, .titled-pane .title {
    -fx-background-color: accent_color;
    -fx-border-color: accent_color;
}

/* titled pane expanded & unexpanded header text */
.titled-pane:expanded .title .text, .titled-pane .title .text {
    -fx-font-family: "Segoe UI";
    -fx-font-size: 1.166667em; /* 14 */
}

/* titled pane expanded & unexpanded header arrow */
.titled-pane:expanded .title .arrow-button .arrow,
.titled-pane .title .arrow-button .arrow {
    -fx-shape: "M 4.21875 10.78125 L 2.78125 12.21875 L 15.28125 24.71875 L 16 25.40625 L 16.71875 24.71875 L 29.21875 12.21875 L 27.78125 10.78125 L 16 22.5625 Z";
}

Changes in JMetroDarkTheme.css: (Summary screen)

image

Code of changes in JMetroDarkTheme.css:

/*******************************************************************************
 *                                                                             *
 * TitledPane (Expanded and unexpanded)                                        *
 *                                                                             *
 ******************************************************************************/

/* titled pane expanded & unexpanded header text */
.titled-pane:expanded .title .text, .titled-pane .title .text {
    -fx-fill: #fff;
}

/* titled pane expanded & unexpanded header arrow */
.titled-pane:expanded .title .arrow-button .arrow, .titled-pane .title .arrow-button .arrow {
    -fx-background-color: #fff;
}

/* titled pane expanded & unexpanded content */
.titled-pane:expanded .content {
    -fx-background-color: #2B2B2B;
    -fx-border-color: #2B2B2B;
}

Changes in JMetroLightTheme.css: (Summary screen)

image

Code of changes in JMetroLightTheme.css:

/*******************************************************************************
 *                                                                             *
 * TitledPane (Expanded and unexpanded)                                        *
 *                                                                             *
 ******************************************************************************/

/* titled pane expanded & unexpanded header text */
.titled-pane:expanded .title .text, .titled-pane .title .text {
    -fx-fill: #fff;
}

/* titled pane expanded & unexpanded header arrow */
.titled-pane:expanded .title .arrow-button .arrow, .titled-pane .title .arrow-button .arrow {
    -fx-background-color: #fff;
}

/* titled pane expanded & unexpanded content */
.titled-pane:expanded .content {
    -fx-background-color: #fff;
    -fx-border-color: #fff;
}
@dukke
Copy link
Member

dukke commented Dec 24, 2018

This is looking good!

However, I personally wouldn't use the accent_color here. We use the accent color in JMetro to guide the users attention towards what's more important in the UI. Since Titled Pane acts only as a container with a header I think it should probably be less prominent than other controls.

Personally I would use a neutral color here, like white for light theme and a close to black color for the dark theme.

@MairwunNx
Copy link
Contributor Author

Thanks, so, i tried set white and black colors, it looks not-super good :) IMHO, accent_color looks better with FD conditions, but it only my opinion ^_^, if you liked white - set white. 👍

@MairwunNx
Copy link
Contributor Author

It fluent card, but, in fluent not exists clearly titled-pane)

image

@dukke
Copy link
Member

dukke commented Dec 24, 2018

I'll have a more thorough look at the fluent card and what's it supposed to be. I wasn't aware of that control. And then I'll get back to this discussion. But in principle I think what I said makes sense, for instance tree view (also a kind of a container of items) doesn't use any accent color (except for selected items) in FD and in JMetro.

Thanks

@MairwunNx
Copy link
Contributor Author

No problem @dukke , thanks for attention! :)

@dukke
Copy link
Member

dukke commented Dec 28, 2018

I can't find the Fluent Design Card in the Fluent Design Specification is that from the official Fluent Design guidelines?

@MairwunNx
Copy link
Contributor Author

@dukke you know about C# lang? If yes - you know UWP technology? If yes - it from UWP kit. You can see all elements of UWP in XAML Controls Gallery application

In official docs for fluent many items no.

XAML Controls Gallery required latest w10 version!

@dukke
Copy link
Member

dukke commented Dec 28, 2018 via email

@MairwunNx
Copy link
Contributor Author

MairwunNx commented Dec 28, 2018

@dukke maybe. You can see it control in "Motion" category and sub-category "Connected Anim"

image

You also can see source of Card https://github.com/Microsoft/Xaml-Controls-Gallery/blob/7536b095756ef21907c55073d5eae670ca2b2c27/XamlControlsGallery/ConnectedAnimationPages/CardPage.xaml#L40 (xaml)

@dukke
Copy link
Member

dukke commented Dec 28, 2018

Ah yes I see.
Thanks for the reference. 👍

That doesn't appear to be a Fluent Design control itself. I think it's more of an example made by a developer to showcase animations.

@dukke
Copy link
Member

dukke commented Dec 29, 2018

Here's what I've done for the light theme so far (I've started with your CSS code as a base and changed it):

image

What are your thoughts?

@dukke
Copy link
Member

dukke commented Dec 29, 2018

And collaped (first titled pane):

image

@MairwunNx
Copy link
Contributor Author

Good for release, it also not bad :) Dark theme exists?

@dukke
Copy link
Member

dukke commented Dec 29, 2018

Thanks!

I'm going to do it now. 👍

@MairwunNx
Copy link
Contributor Author

@dukke good.))) Good luck! 🎉🎉

@dukke
Copy link
Member

dukke commented Dec 30, 2018

Dark and light style for Titled Pane added.

Arrow has been made slightly smaller since last posted screenshots.

Here's the dark style:
image

With mouse hover top most Titled Pane:
image

Collapsed Titled Pane:
image

Pavel, thoughts?

@MairwunNx
Copy link
Contributor Author

Hello @dukke , yes, it looks very good, i think you can commit changes, good and great job! 👍

@dukke
Copy link
Member

dukke commented Dec 30, 2018

Thanks Pavel! I'm glad you like it.

Changes are commited and in the repo.

I think now making JMetro style for accordion will probably be very easy, since I think it shares a lot with Titled Panes.

@dukke dukke closed this as completed Dec 30, 2018
@MairwunNx
Copy link
Contributor Author

@dukke good job! Thanks. :), ok, accordion new style it be good :)) wait :)

@dukke
Copy link
Member

dukke commented Jan 1, 2019

I'm glad you like that.
I've added Issue #30 for that. Will be my next thing to add to JMetro

@MairwunNx
Copy link
Contributor Author

@dukke yes, i see it :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants