Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/core/edit/edit.cell.view.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export declare class EditCellView {

value: any;
label: any;
theme: string | Array<string>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not allowed to make it here


readonly cell: CellView;
readonly row: any;
Expand Down
4 changes: 4 additions & 0 deletions src/core/edit/edit.cell.view.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export class EditCellView {
cell.mode(value);
}

get theme(){
return this.model.style().classList;
}

get commands() {
const { model, table } = this;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<q-grid caption="Look People" class="q-grid-dark"
[rows]="rows | async">
<q-grid caption="Look People"
class="q-grid-dark"
[rows]="rows | async"
editMode="cell">
<q-grid-columns generation="deep">
</q-grid-columns>
</q-grid>
178 changes: 124 additions & 54 deletions src/theme/material/assets/dark.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,65 @@
.q-grid-dark {
//Custom colors
$color-less: rgba(0, 0, 0, 0);
$dark: #424242;
$dark-primary: #1eb980;
$dark-accent: #616161;
$dark-focused: #5565A0;
$dark-focused: #118d5fc2;
$dark-highlighted: #8d8d8d;
$dark-surface: #363640;
$dark-container: #3c3c46;
$dark-text: #ffffff;
$dark-header: rgba(255, 255, 255, 0.6);
$dark-label: rgba(255, 255, 255, 0.6);
$dark-label-focused: rgba(255, 255, 255, 0.2);
$dark-subscript: rgba(255, 255, 255, 0.6);
$dark-divider: rgba(255, 255, 255, 0.12);
$dark-icon-button: #c8c8c8;

mat-calendar.q-grid-dark{
background-color: $dark-container;
font-family: "Roboto Condensed";
font-weight: 300;
}

.q-grid-dark {
.mat-calendar-table-header{
color: $dark-header;
}
.mat-calendar-body-label{
color: $dark-label;
}
.mat-calendar-body-cell-content{
color: $dark-text;
}

.mat-calendar-table-header-divider::after{
background-color: $dark-primary;
}
.mat-calendar-body-selected {
background-color: $dark-highlighted;;
}

.mat-button, .mat-icon-button, .mat-stroked-button {
color: $dark-icon-button;
}
.mat-form-field {
font-weight: 300;
.mat-form-field-label{
color: $dark-label;
}
}

.mat-form-field.mat-focused {
.mat-form-field-label{
color: $dark-label-focused;
}
}

.q-grid.q-grid-theme-material {
background-color: $dark-surface;
font-family: "Roboto Condensed", Roboto, "Helvetica Neue", sans-serif;
font-weight: 300;

thead {
box-shadow: 0 1px 0px $dark-divider;
th {
Expand Down Expand Up @@ -100,26 +145,28 @@
.q-grid-editor {
color: $dark-text;
background-color: $dark;
font-size: 13px;
.mat-input-element{
font-family: "Roboto Condensed";
font-weight: 300;
}
}
}
.q-grid-icon {
color: $dark-text;
}
.mat-hint {
color: $dark-text;
color: $dark-subscript;
}
.mat-form-field-underline {
background-color: $dark-text;
background-color: $dark-divider;
}
.mat-checkbox-frame {
border-color: $dark-text;
}
.mat-icon {
color: $dark-text;
}
.mat-form-field-ripple {
background-color: $dark-accent;
}
}
ul.q-grid-legend-list {
color: $dark-text;
Expand Down Expand Up @@ -155,58 +202,81 @@
}
.mat-menu-content {
background: $dark;
height: 500px;
}
q-grid-column-chooser,
q-grid-column-filter {
.mat-card {
background-color: $dark;

.q-grid-column-chooser {
.mat-menu-content {
height: 500px;
}
}

.mat-focused {
.mat-form-field-ripple {
background-color: $dark-primary;
}
}

.mat-form-field-underline {
background-color: $dark-divider;
}


.mat-card {
background-color: $dark;
color: $dark-text;
font-weight: 300;
.mat-card-title {
font-size: 16px;
}
.mat-button {
color: $dark-text;
}
.mat-button:hover {
background-color: $dark-accent;
}
.mat-button.mat-primary {
background-color: $dark-accent;
}
.mat-form-field-label {
color: $dark-text;
}
.mat-input-underline {
color: #fff;
}
.mat-form-field {
font-weight: 300;
.mat-card-title {
font-size: 16px;
}
.mat-button {
color: $dark-text;
}
.mat-button:hover {
background-color: $dark-accent;
}
.mat-button.mat-primary {
background-color: $dark-accent;
}
.mat-form-field-label {
color: $dark-text;
}
.mat-input-underline {
color: #fff;
}
.mat-form-field {
font-weight: 300;
}
.mat-form-field-underline {
background-color: $dark-divider;
}
.mat-form-field-ripple {
background-color: $dark-primary;
}
.mat-form-field-should-float label,
.q-grid-filter-by-item {
font-family: "Roboto Condensed", Roboto, "Helvetica Neue", sans-serif;
font-weight: 300;
}
.q-grid-filter-by-item {
color: $dark;
}
.mat-checkbox-checked.mat-accent .mat-checkbox-background,
.mat-checkbox-indeterminate.mat-accent .mat-checkbox-background {
background-color: $dark-accent;
}
.q-grid-highlight-part {
background-color: $dark-highlighted;
color: $dark-text;

.mat-focused {
.mat-form-field-ripple {
background-color: $dark-primary;
}
}
}

.mat-form-field-underline {
background-color: $dark-divider;
}

.mat-form-field-should-float label,
.q-grid-filter-by-item {
font-family: "Roboto Condensed", Roboto, "Helvetica Neue", sans-serif;
font-weight: 300;
}
.q-grid-filter-by-item {
color: $dark;
}
.mat-checkbox-checked.mat-accent .mat-checkbox-background,
.mat-checkbox-indeterminate.mat-accent .mat-checkbox-background {
background-color: $dark-accent;
}
.q-grid-highlight-part {
background-color: $dark-highlighted;
color: $dark-text;
}
}

q-grid-column-chooser,
q-grid-column-filter {
label {
border-color: $dark-text;
}
Expand Down
2 changes: 1 addition & 1 deletion src/theme/material/templates/edit-cell-date.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<mat-datepicker-toggle matSuffix
[for]="picker">
</mat-datepicker-toggle>
<mat-datepicker #picker>
<mat-datepicker #picker [panelClass]="$view.edit.cell.theme">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a special service theme and call it instead of edit so it would be $view.theme.class

</mat-datepicker>
</mat-form-field>
</ng-template>
Expand Down
2 changes: 1 addition & 1 deletion src/theme/material/templates/plugin-pager-target.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<mat-menu #menu="matMenu"
class="q-grid-mat-menu">
<mat-card *ngIf="trigger.menuOpen">
<mat-card *ngIf="trigger.menuOpen" q-grid-theme-overlay>
<mat-form-field>
<input id="q-grid-menu-input"
matInput
Expand Down