diff options
author | xue <> | 2006-02-03 07:06:11 +0000 |
---|---|---|
committer | xue <> | 2006-02-03 07:06:11 +0000 |
commit | baac41fc1e52c2902feabf778915195042b196b0 (patch) | |
tree | da665febbd2a2faa320c9659cea243f323a4672c /framework/Web/UI/WebControls/TFont.php | |
parent | 0efe2d3e9e02ada6fe297af823b90fa967de85df (diff) |
Fixed an issue about style merging.
Diffstat (limited to 'framework/Web/UI/WebControls/TFont.php')
-rw-r--r-- | framework/Web/UI/WebControls/TFont.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/framework/Web/UI/WebControls/TFont.php b/framework/Web/UI/WebControls/TFont.php index d958c0ee..51d864c3 100644 --- a/framework/Web/UI/WebControls/TFont.php +++ b/framework/Web/UI/WebControls/TFont.php @@ -209,27 +209,27 @@ class TFont extends TComponent /**
* Merges the font with a new one.
- * If a style field is not set in the current style but set in the new style
- * it will take the value from the new style.
+ * If a font field is set in the new font, the current font field
+ * will be overwritten.
* @param TFont the new font
*/
public function mergeWith($font)
{
if($font===null || $font->_flags===0)
return;
- if(($font->_flags & self::IS_SET_BOLD) && !($this->_flags & self::IS_SET_BOLD))
+ if($font->_flags & self::IS_SET_BOLD)
$this->setBold($font->getBold());
- if(($font->_flags & self::IS_SET_ITALIC) && !($this->_flags & self::IS_SET_ITALIC))
+ if($font->_flags & self::IS_SET_ITALIC)
$this->setItalic($font->getItalic());
- if(($font->_flags & self::IS_SET_OVERLINE) && !($this->_flags & self::IS_SET_OVERLINE))
+ if($font->_flags & self::IS_SET_OVERLINE)
$this->setOverline($font->getOverline());
- if(($font->_flags & self::IS_SET_STRIKEOUT) && !($this->_flags & self::IS_SET_STRIKEOUT))
+ if($font->_flags & self::IS_SET_STRIKEOUT)
$this->setStrikeout($font->getStrikeout());
- if(($font->_flags & self::IS_SET_UNDERLINE) && !($this->_flags & self::IS_SET_UNDERLINE))
+ if($font->_flags & self::IS_SET_UNDERLINE)
$this->setUnderline($font->getUnderline());
- if(($font->_flags & self::IS_SET_SIZE) && !($this->_flags & self::IS_SET_SIZE))
+ if($font->_flags & self::IS_SET_SIZE)
$this->setSize($font->getSize());
- if(($font->_flags & self::IS_SET_NAME) && !($this->_flags & self::IS_SET_NAME))
+ if($font->_flags & self::IS_SET_NAME)
$this->setName($font->getName());
}
|