usePixmap from Texture
This commit is contained in:
parent
d2959aeb6b
commit
c5b79ed14b
8 changed files with 21 additions and 25 deletions
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: ButtonTool.cc,v 1.1 2003/10/13 23:38:17 fluxgen Exp $
|
||||
// $Id: ButtonTool.cc,v 1.2 2003/12/07 16:39:43 fluxgen Exp $
|
||||
|
||||
#include "ButtonTool.hh"
|
||||
|
||||
|
@ -56,7 +56,7 @@ void ButtonTool::renderTheme() {
|
|||
btn.setBorderWidth(theme().border().width());
|
||||
|
||||
Pixmap old_pm = m_cache_pm;
|
||||
if (theme().texture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!theme().texture().usePixmap()) {
|
||||
m_cache_pm = 0;
|
||||
btn.setBackgroundColor(theme().texture().color());
|
||||
} else {
|
||||
|
@ -68,8 +68,7 @@ void ButtonTool::renderTheme() {
|
|||
m_image_ctrl.removeImage(old_pm);
|
||||
|
||||
old_pm = m_cache_pressed_pm;
|
||||
if (static_cast<const ButtonTheme &>(theme()).pressed().type() ==
|
||||
(FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (! static_cast<const ButtonTheme &>(theme()).pressed().usePixmap()) {
|
||||
m_cache_pressed_pm = 0;
|
||||
btn.setPressedColor(static_cast<const ButtonTheme &>(theme()).pressed().color());
|
||||
} else {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: ClockTool.cc,v 1.7 2003/12/06 16:49:06 fluxgen Exp $
|
||||
// $Id: ClockTool.cc,v 1.8 2003/12/07 16:39:43 fluxgen Exp $
|
||||
|
||||
#include "ClockTool.hh"
|
||||
|
||||
|
@ -216,7 +216,7 @@ void ClockTool::updateTime() {
|
|||
|
||||
void ClockTool::renderTheme() {
|
||||
Pixmap old_pm = m_pixmap;
|
||||
if (m_theme.texture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!m_theme.texture().usePixmap()) {
|
||||
m_pixmap = 0;
|
||||
m_button.setBackgroundColor(m_theme.texture().color());
|
||||
} else {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: FbWinFrame.cc,v 1.62 2003/10/31 10:37:09 rathnor Exp $
|
||||
// $Id: FbWinFrame.cc,v 1.63 2003/12/07 16:39:43 fluxgen Exp $
|
||||
|
||||
#include "FbWinFrame.hh"
|
||||
|
||||
|
@ -1024,7 +1024,7 @@ void FbWinFrame::render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm,
|
|||
unsigned int w, unsigned int h) {
|
||||
|
||||
Pixmap tmp = pm;
|
||||
if (tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!tex.usePixmap()) {
|
||||
pm = None;
|
||||
col = tex.color();
|
||||
} else
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: IconbarTool.cc,v 1.18 2003/12/03 00:16:56 fluxgen Exp $
|
||||
// $Id: IconbarTool.cc,v 1.19 2003/12/07 16:39:43 fluxgen Exp $
|
||||
|
||||
#include "IconbarTool.hh"
|
||||
|
||||
|
@ -416,7 +416,7 @@ void IconbarTool::renderWindow(FluxboxWindow &win) {
|
|||
|
||||
void IconbarTool::renderTheme() {
|
||||
Pixmap tmp = m_focused_pm;
|
||||
if (m_theme.focusedTexture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!m_theme.focusedTexture().usePixmap()) {
|
||||
m_focused_pm = 0;
|
||||
} else {
|
||||
m_focused_pm = m_screen.imageControl().renderImage(m_icon_container.maxWidthPerClient(),
|
||||
|
@ -428,7 +428,7 @@ void IconbarTool::renderTheme() {
|
|||
m_screen.imageControl().removeImage(tmp);
|
||||
|
||||
tmp = m_unfocused_pm;
|
||||
if (m_theme.unfocusedTexture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!m_theme.unfocusedTexture().usePixmap()) {
|
||||
m_unfocused_pm = 0;
|
||||
} else {
|
||||
m_unfocused_pm = m_screen.imageControl().renderImage(m_icon_container.maxWidthPerClient(),
|
||||
|
@ -440,7 +440,7 @@ void IconbarTool::renderTheme() {
|
|||
|
||||
// if we dont have any icons then we should render empty texture
|
||||
tmp = m_empty_pm;
|
||||
if (m_theme.emptyTexture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!m_theme.emptyTexture().usePixmap()) {
|
||||
m_empty_pm = 0;
|
||||
m_icon_container.setBackgroundColor(m_theme.emptyTexture().color());
|
||||
} else {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Screen.cc,v 1.244 2003/12/04 21:31:02 fluxgen Exp $
|
||||
// $Id: Screen.cc,v 1.245 2003/12/07 16:39:43 fluxgen Exp $
|
||||
|
||||
|
||||
#include "Screen.hh"
|
||||
|
@ -2160,8 +2160,7 @@ void BScreen::renderGeomWindow() {
|
|||
Pixmap tmp = geom_pixmap;
|
||||
|
||||
if (winFrameTheme().labelFocusTexture().type() & FbTk::Texture::PARENTRELATIVE) {
|
||||
if (winFrameTheme().titleFocusTexture().type() ==
|
||||
(FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!winFrameTheme().titleFocusTexture().usePixmap()) {
|
||||
geom_pixmap = None;
|
||||
m_geom_window.setBackgroundColor(winFrameTheme().titleFocusTexture().color());
|
||||
} else {
|
||||
|
@ -2170,8 +2169,7 @@ void BScreen::renderGeomWindow() {
|
|||
m_geom_window.setBackgroundPixmap(geom_pixmap);
|
||||
}
|
||||
} else {
|
||||
if (winFrameTheme().labelFocusTexture().type() ==
|
||||
(FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!winFrameTheme().labelFocusTexture().usePixmap()) {
|
||||
geom_pixmap = None;
|
||||
m_geom_window.setBackgroundColor(winFrameTheme().labelFocusTexture().color());
|
||||
} else {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Slit.cc,v 1.81 2003/11/01 00:12:53 rathnor Exp $
|
||||
// $Id: Slit.cc,v 1.82 2003/12/07 16:39:43 fluxgen Exp $
|
||||
|
||||
#include "Slit.hh"
|
||||
|
||||
|
@ -708,9 +708,8 @@ void Slit::reconfigure() {
|
|||
Pixmap tmp = frame.pixmap;
|
||||
FbTk::ImageControl &image_ctrl = screen().imageControl();
|
||||
const FbTk::Texture &texture = m_slit_theme->texture();
|
||||
if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID) &&
|
||||
texture.pixmap().drawable() == 0) {
|
||||
frame.pixmap = None;
|
||||
if (!texture.usePixmap()) {
|
||||
frame.pixmap = 0;
|
||||
frame.window.setBackgroundColor(texture.color());
|
||||
} else {
|
||||
frame.pixmap = image_ctrl.renderImage(frame.width, frame.height,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Toolbar.cc,v 1.128 2003/12/07 15:27:52 fluxgen Exp $
|
||||
// $Id: Toolbar.cc,v 1.129 2003/12/07 16:39:43 fluxgen Exp $
|
||||
|
||||
#include "Toolbar.hh"
|
||||
|
||||
|
@ -432,7 +432,7 @@ void Toolbar::reconfigure() {
|
|||
|
||||
// render frame window
|
||||
Pixmap tmp = m_window_pm;
|
||||
if (theme().toolbar().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!theme().toolbar().usePixmap()) {
|
||||
m_window_pm = 0;
|
||||
frame.window.setBackgroundColor(theme().toolbar().color());
|
||||
} else {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: WorkspaceNameTool.cc,v 1.5 2003/08/26 23:20:07 fluxgen Exp $
|
||||
// $Id: WorkspaceNameTool.cc,v 1.6 2003/12/07 16:39:43 fluxgen Exp $
|
||||
|
||||
#include "WorkspaceNameTool.hh"
|
||||
|
||||
|
@ -109,7 +109,7 @@ void WorkspaceNameTool::hide() {
|
|||
|
||||
void WorkspaceNameTool::renderTheme() {
|
||||
Pixmap tmp = m_pixmap;
|
||||
if (m_theme.texture().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
|
||||
if (!m_theme.texture().usePixmap()) {
|
||||
m_pixmap = 0;
|
||||
m_button.setBackgroundColor(m_theme.texture().color());
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue