Fixed Dark theme UI related issues. Fixes #6846

This commit is contained in:
Aditya Toshniwal 2021-10-04 12:41:48 +05:30 committed by Akshay Joshi
parent 65af8bcc5a
commit 038fd6ce21
5 changed files with 25 additions and 4 deletions

View File

@ -275,8 +275,13 @@ export default class ColumnSchema extends BaseUISchema {
return _.isUndefined(this.nodeInfo['table'] || this.nodeInfo['view'] || this.nodeInfo['mview']);
},
},{
id: 'attlen', label: gettext('Length/Precision'), cell: 'int',
id: 'attlen', label: gettext('Length/Precision'),
deps: ['cltype'], type: 'int', group: gettext('Definition'), width: 120, disableResizing: true,
cell: (state)=>{
return {
cell: obj.attlenRange(state) ? 'int' : '',
};
},
depChange: (state)=>{
let range = this.attlenRange(state);
if(range) {
@ -300,8 +305,13 @@ export default class ColumnSchema extends BaseUISchema {
return Boolean(obj.attlenRange(state));
},
},{
id: 'attprecision', label: gettext('Scale'), cell: 'int', width: 60, disableResizing: true,
id: 'attprecision', label: gettext('Scale'), width: 60, disableResizing: true,
deps: ['cltype'], type: 'int', group: gettext('Definition'),
cell: (state)=>{
return {
cell: obj.attlenRange(state) ? 'int' : '',
};
},
depChange: (state)=>{
let range = this.attprecisionRange(state);
if(range) {

View File

@ -264,7 +264,7 @@ export class PartitionsSchema extends BaseUISchema {
}
return false;
},
disabled: function(state) {
readonly: function(state) {
if(obj.top && obj.top.sessData.partition_type == 'list' && obj.isNew(state)
&& state.is_default !== true) {
return false;

View File

@ -26,7 +26,7 @@ export default function(basicSettings) {
},
primary: {
main: '#234d6e',
light: '#d6effc',
light: '#323E43',
contrastText: '#fff',
hoverMain: darken('#234d6e', 0.25),
hoverBorderColor: darken('#234d6e', 0.25),

View File

@ -233,6 +233,11 @@ function getFinalTheme(baseTheme) {
mixins: mixins,
overrides: {
MuiOutlinedInput: {
root: {
'&.Mui-disabled .MuiOutlinedInput-notchedOutline': {
borderColor: baseTheme.otherVars.inputBorderColor,
},
},
notchedOutline: {
borderColor: baseTheme.otherVars.inputBorderColor,
}
@ -259,12 +264,16 @@ function getFinalTheme(baseTheme) {
root: {
backgroundColor: baseTheme.palette.background.default,
textOverflow: 'ellipsis',
'&.Mui-disabled': {
backgroundColor: baseTheme.otherVars.inputDisabledBg,
},
},
inputMultiline: {
fontSize: baseTheme.typography.fontSize,
height: 'unset',
backgroundColor: baseTheme.palette.background.default,
'&[readonly], &.Mui-disabled': {
color: baseTheme.palette.text.muted,
backgroundColor: baseTheme.otherVars.inputDisabledBg,
},
},
@ -273,6 +282,7 @@ function getFinalTheme(baseTheme) {
height: 'unset',
backgroundColor: baseTheme.palette.background.default,
'&[readonly], &.Mui-disabled': {
color: baseTheme.palette.text.muted,
backgroundColor: baseTheme.otherVars.inputDisabledBg,
},
}

View File

@ -589,6 +589,7 @@ const customReactSelectStyles = (theme, readonly)=>({
...provided,
minHeight: '0',
backgroundColor: readonly ? theme.otherVars.inputDisabledBg : theme.palette.background.default,
color: readonly ? theme.palette.text.muted : theme.palette.text.primary,
borderColor: theme.otherVars.inputBorderColor,
...(state.isFocused ? {
borderColor: theme.palette.primary.main,