void MSLayout::computeSize(void) { drawBackground(); placement(); positionLabel(); drawShadow(); }
void ofxDatGuiComponent::setLabel(string label) { if (mLabel.forceUpperCase) label = ofToUpper(label); mLabel.text = label; mLabel.rect = mFont->rect(mLabel.text); positionLabel(); }
void MSLayout::updateTitle(void) { undrawShadow(); label()->freeze(); label()->foreground(titleForeground()); int h=label()->height(); int w=label()->width(); label()->font(titleFont()); MSBoolean doPlacement=MSFalse; label()->label(title()); int ml=label()->columns(); if (ml==0&&label()->mapped()==MSTrue) { label()->unmap(); doPlacement=MSTrue; } else if (ml>0&&label()->mapped()==MSFalse) { label()->map(); doPlacement=MSTrue; } positionLabel(); label()->unfreeze(); if (label()->height()!=h||label()->width()!=w||doPlacement==MSTrue) adjustSize(); else if (label()->mapped()==MSTrue) label()->redraw(); drawShadow(); }
void ofxDatGuiComponent::setWidth(int width, float labelWidth) { mStyle.width = width; if (labelWidth > 1){ // we received a pixel value // mLabel.width = labelWidth; } else{ // we received a percentage // mLabel.width = mStyle.width * labelWidth; } mIcon.x = mStyle.width - (mStyle.width * .05) - 20; mLabel.rightAlignedXpos = mLabel.width - mLabel.margin; for (int i=0; i<children.size(); i++) children[i]->setWidth(width, labelWidth); positionLabel(); }
void ofxDatGuiComponent::setLabelAlignment(ofxDatGuiAlignment align) { mLabel.alignment = align; for (int i=0; i<children.size(); i++) children[i]->setLabelAlignment(align); positionLabel(); }
void KRenameListView::resizeEvent(QResizeEvent* e) { QListView::resizeEvent( e ); positionLabel(); }
void MSLayout::configure(void) { if (label()!=0) positionLabel(); }