[DEBUG] correct color selection error
This commit is contained in:
parent
857ad3001b
commit
bba1477118
@ -2,6 +2,7 @@
|
||||
"ednColor": [
|
||||
{ name:"backgroung1", foreground:"#202020" },
|
||||
{ name:"backgroung2", foreground:"#000000" },
|
||||
{ name:"backgroundhide", foreground:"#606060" },
|
||||
{ name:"backgroungSelected", foreground:"#2f0ba4" },
|
||||
{ name:"textNormal", foreground:"#EEEEEE" },
|
||||
{ name:"textModify", foreground:"#FF0000" },
|
||||
|
@ -2,6 +2,7 @@
|
||||
"ednColor": [
|
||||
{ name:"backgroung1", foreground:"#d9d7d7"},
|
||||
{ name:"backgroung2", foreground:"#b7b6b6"},
|
||||
{ name:"backgroundhide", foreground:"#606060" },
|
||||
{ name:"backgroungSelected", foreground:"#3da3f9"},
|
||||
{ name:"textNormal", foreground:"#000000"},
|
||||
{ name:"textModify", foreground:"#FF0000"}
|
||||
|
@ -194,6 +194,7 @@ fluorine::Variant appl::widget::BufferList::getData(int32_t _role, const ivec2&
|
||||
return (*m_paintingProperties)[m_colorTextModify].getForeground();
|
||||
}
|
||||
case ewol::widget::ListRole::BgColor:
|
||||
APPL_ERROR( m_colorBackground1 << " => " << (*m_paintingProperties)[m_colorBackground1].getForeground());
|
||||
if (m_selectedID == _pos.y()) {
|
||||
return (*m_paintingProperties)[m_colorBackgroundSelect].getForeground();
|
||||
}
|
||||
|
@ -36,10 +36,11 @@ appl::widget::BufferTree::BufferTree() :
|
||||
// load buffer manager:
|
||||
m_bufferManager = appl::BufferManager::create();
|
||||
// load color properties
|
||||
m_paintingProperties = appl::GlyphPainting::create("THEME:COLOR:BufferList.json");
|
||||
m_paintingProperties = appl::GlyphPainting::create("THEME:COLOR:bufferList.json");
|
||||
// get all id properties ...
|
||||
m_colorBackground1 = m_paintingProperties->request("backgroung1");
|
||||
m_colorBackground2 = m_paintingProperties->request("backgroung2");
|
||||
m_colorBackgroundHide = m_paintingProperties->request("backgroundhide");
|
||||
m_colorBackgroundSelect = m_paintingProperties->request("backgroungSelected");
|
||||
m_colorTextNormal = m_paintingProperties->request("textNormal");
|
||||
m_colorTextModify = m_paintingProperties->request("textModify");
|
||||
@ -91,7 +92,7 @@ void appl::widget::BufferTree::updateFlatTree() {
|
||||
}
|
||||
// Now we have the root path...
|
||||
// Need to feed all elements needed
|
||||
etk::FSNode nodeRoot = upperParent;
|
||||
etk::FSNode nodeRoot = etk::FSNode(upperParent).getFileName();
|
||||
m_tree = etk::TreeNode<appl::TreeElement>::create(TreeElement(upperParent, true, true));
|
||||
etk::Vector<etk::FSNode*> child = nodeRoot.folderGetSubList(false, true, true, false);
|
||||
for (auto& it: child) {
|
||||
@ -242,14 +243,17 @@ fluorine::Variant appl::widget::BufferTree::getData(int32_t _role, const ivec2&
|
||||
case ewol::widget::ListRole::Text:
|
||||
return value.m_nodeName;
|
||||
case ewol::widget::ListRole::FgColor:
|
||||
/*if ( m_list[_pos.y()].m_buffer != null
|
||||
&& m_list[_pos.y()].m_buffer->isModify() == false) {
|
||||
return (*m_paintingProperties)[m_colorTextNormal].getForeground();
|
||||
} else {*/
|
||||
if (value.m_buffer == null) {
|
||||
//APPL_ERROR( m_colorBackgroundHide << " => " << (*m_paintingProperties)[m_colorBackgroundHide].getForeground());
|
||||
return (*m_paintingProperties)[m_colorTextModify].getForeground();
|
||||
//}
|
||||
}
|
||||
if (value.m_buffer->isModify() == false) {
|
||||
return (*m_paintingProperties)[m_colorTextNormal].getForeground();
|
||||
}
|
||||
return (*m_paintingProperties)[m_colorTextModify].getForeground();
|
||||
case ewol::widget::ListRole::BgColor:
|
||||
return fluorine::Variant();
|
||||
//return fluorine::Variant();
|
||||
//APPL_ERROR( m_colorBackground1 << " => " << (*m_paintingProperties)[m_colorBackground1].getForeground());
|
||||
if (_pos.y() % 2) {
|
||||
return (*m_paintingProperties)[m_colorBackground1].getForeground();
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ namespace appl {
|
||||
ememory::SharedPtr<appl::GlyphPainting> m_paintingProperties; //!< element painting property
|
||||
int32_t m_colorBackground1;
|
||||
int32_t m_colorBackground2;
|
||||
int32_t m_colorBackgroundHide;
|
||||
int32_t m_colorBackgroundSelect;
|
||||
int32_t m_colorTextNormal;
|
||||
int32_t m_colorTextModify;
|
||||
|
Loading…
Reference in New Issue
Block a user