[DEV] popup add fill state
This commit is contained in:
parent
0397c2ec98
commit
12c2831a20
@ -358,8 +358,8 @@ void guiInterface::SetIcon(etk::UString inputFile)
|
||||
for(ivec2 pos(0,0); pos.y()<dataImage.GetHeight(); pos.setY(pos.y()+1)) {
|
||||
for(pos.setX(0); pos.x()<dataImage.GetHeight(); pos.setX(pos.x()+1)) {
|
||||
draw::Color tmpColor = dataImage.Get(pos);
|
||||
int16_t tmpVal = ((uint16_t)((uint16_t)tmpColor.r>>3))<<11
|
||||
+ ((uint16_t)((uint16_t)tmpColor.g>>2))<<5
|
||||
int16_t tmpVal = (((uint16_t)((uint16_t)tmpColor.r>>3))<<11)
|
||||
+ (((uint16_t)((uint16_t)tmpColor.g>>2))<<5)
|
||||
+ ((uint16_t)((uint16_t)tmpColor.b>>3));
|
||||
*tmpPointer++ = (uint8_t)(tmpVal>>8);
|
||||
*tmpPointer++ = (uint8_t)(tmpVal&0x00FF);
|
||||
|
@ -145,6 +145,5 @@ bool widget::Label::LoadXML(TiXmlNode* _node)
|
||||
// TODO : Unparse data type XML ...
|
||||
EWOL_DEBUG("Load label:" << _node->ToElement()->GetText());
|
||||
SetLabel(_node->ToElement()->GetText());
|
||||
EWOL_ERROR(" parse text : \"" << m_label << "\"");
|
||||
return true;
|
||||
}
|
||||
|
@ -64,7 +64,6 @@ void widget::PopUp::SetShaperName(const etk::UString& _shaperName)
|
||||
void widget::PopUp::CalculateSize(const vec2& _availlable)
|
||||
{
|
||||
ewol::Widget::CalculateSize(_availlable);
|
||||
m_size = _availlable;
|
||||
if (NULL != m_subWidget) {
|
||||
vec2 subWidgetSize = m_subWidget->GetCalculateMinSize();
|
||||
if (true == m_subWidget->CanExpand().x()) {
|
||||
@ -117,6 +116,14 @@ void widget::PopUp::OnRegenerateDisplay(void)
|
||||
m_shaper.Clear();
|
||||
vec2 padding = m_shaper.GetPadding();
|
||||
vec2 tmpSize(0,0);
|
||||
bvec2 expand = CanExpand();
|
||||
bvec2 fill = CanFill();
|
||||
if (fill.x()) {
|
||||
tmpSize.setX(m_size.x()-padding.x()*2);
|
||||
}
|
||||
if (fill.y()) {
|
||||
tmpSize.setY(m_size.y()-padding.y()*2);
|
||||
}
|
||||
if (NULL != m_subWidget) {
|
||||
vec2 tmpSize = m_subWidget->GetSize();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user