minor stuff
This commit is contained in:
parent
09a5c23c5b
commit
312b7b0523
1 changed files with 22 additions and 15 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: FbWinFrame.cc,v 1.27 2003/06/13 21:00:18 fluxgen Exp $
|
// $Id: FbWinFrame.cc,v 1.28 2003/06/23 14:18:54 fluxgen Exp $
|
||||||
|
|
||||||
#include "FbWinFrame.hh"
|
#include "FbWinFrame.hh"
|
||||||
#include "ImageControl.hh"
|
#include "ImageControl.hh"
|
||||||
|
@ -687,6 +687,7 @@ void FbWinFrame::renderTitlebar() {
|
||||||
void FbWinFrame::renderHandles() {
|
void FbWinFrame::renderHandles() {
|
||||||
if (!m_use_handle || !m_visible)
|
if (!m_use_handle || !m_visible)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
render(m_theme.handleFocusTexture(), m_handle_focused_color,
|
render(m_theme.handleFocusTexture(), m_handle_focused_color,
|
||||||
m_handle_focused_pm,
|
m_handle_focused_pm,
|
||||||
m_handle.width(), m_handle.height());
|
m_handle.width(), m_handle.height());
|
||||||
|
@ -765,17 +766,19 @@ void FbWinFrame::renderButtons() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void FbWinFrame::init() {
|
void FbWinFrame::init() {
|
||||||
// clear pixmaps
|
|
||||||
m_current_label = 0; // no focused button at first
|
m_current_label = 0; // no focused button at first
|
||||||
|
|
||||||
|
// clear pixmaps
|
||||||
m_title_focused_pm = m_title_unfocused_pm = 0;
|
m_title_focused_pm = m_title_unfocused_pm = 0;
|
||||||
m_label_focused_pm = m_label_unfocused_pm = 0;
|
m_label_focused_pm = m_label_unfocused_pm = 0;
|
||||||
m_button_unfocused_pm = m_button_pressed_pm = 0;
|
m_handle_focused_pm = m_handle_unfocused_pm = 0;
|
||||||
m_double_click_time = 200;
|
m_button_pm = m_button_unfocused_pm = m_button_pressed_pm = 0;
|
||||||
m_button_pm = 0;
|
|
||||||
m_button_size = 26;
|
|
||||||
m_handle_focused_pm =
|
|
||||||
m_handle_unfocused_pm = 0;
|
|
||||||
m_grip_unfocused_pm = m_grip_focused_pm = 0;
|
m_grip_unfocused_pm = m_grip_focused_pm = 0;
|
||||||
|
|
||||||
|
m_double_click_time = 200;
|
||||||
|
m_button_size = 26;
|
||||||
|
|
||||||
m_clientarea.setBorderWidth(0);
|
m_clientarea.setBorderWidth(0);
|
||||||
m_shaded = false;
|
m_shaded = false;
|
||||||
m_label.show();
|
m_label.show();
|
||||||
|
@ -783,7 +786,7 @@ void FbWinFrame::init() {
|
||||||
showHandle();
|
showHandle();
|
||||||
showTitlebar();
|
showTitlebar();
|
||||||
|
|
||||||
// note: we don't show clientarea yet
|
// Note: we don't show clientarea yet
|
||||||
|
|
||||||
setEventHandler(*this);
|
setEventHandler(*this);
|
||||||
|
|
||||||
|
@ -852,10 +855,11 @@ void FbWinFrame::getCurrentFocusPixmap(Pixmap &label_pm, Pixmap &title_pm,
|
||||||
}
|
}
|
||||||
|
|
||||||
void FbWinFrame::getUnFocusPixmap(Pixmap &label_pm, Pixmap &title_pm,
|
void FbWinFrame::getUnFocusPixmap(Pixmap &label_pm, Pixmap &title_pm,
|
||||||
FbTk::Color &label_color, FbTk::Color &title_color) {
|
FbTk::Color &label_color,
|
||||||
if (m_label_unfocused_pm != 0)
|
FbTk::Color &title_color) {
|
||||||
|
if (m_label_unfocused_pm != 0) {
|
||||||
label_pm = m_label_unfocused_pm;
|
label_pm = m_label_unfocused_pm;
|
||||||
else
|
} else
|
||||||
label_color = m_label_unfocused_color;
|
label_color = m_label_unfocused_color;
|
||||||
|
|
||||||
if (m_title_unfocused_pm != 0)
|
if (m_title_unfocused_pm != 0)
|
||||||
|
@ -866,8 +870,8 @@ void FbWinFrame::getUnFocusPixmap(Pixmap &label_pm, Pixmap &title_pm,
|
||||||
|
|
||||||
void FbWinFrame::renderLabelButtons() {
|
void FbWinFrame::renderLabelButtons() {
|
||||||
if (!m_visible) return;
|
if (!m_visible) return;
|
||||||
Pixmap label_pm = None;
|
Pixmap label_pm = 0;
|
||||||
Pixmap not_used_pm = None;
|
Pixmap not_used_pm = 0;
|
||||||
FbTk::Color label_color;
|
FbTk::Color label_color;
|
||||||
FbTk::Color not_used_color;
|
FbTk::Color not_used_color;
|
||||||
getCurrentFocusPixmap(label_pm, not_used_pm,
|
getCurrentFocusPixmap(label_pm, not_used_pm,
|
||||||
|
@ -876,8 +880,10 @@ void FbWinFrame::renderLabelButtons() {
|
||||||
ButtonList::iterator btn_it = m_labelbuttons.begin();
|
ButtonList::iterator btn_it = m_labelbuttons.begin();
|
||||||
ButtonList::iterator btn_it_end = m_labelbuttons.end();
|
ButtonList::iterator btn_it_end = m_labelbuttons.end();
|
||||||
for (; btn_it != btn_it_end; ++btn_it) {
|
for (; btn_it != btn_it_end; ++btn_it) {
|
||||||
|
|
||||||
(*btn_it)->setGC(theme().labelTextFocusGC());
|
(*btn_it)->setGC(theme().labelTextFocusGC());
|
||||||
(*btn_it)->window().setBorderWidth(1);
|
(*btn_it)->window().setBorderWidth(1);
|
||||||
|
|
||||||
if (m_label_unfocused_pm != 0)
|
if (m_label_unfocused_pm != 0)
|
||||||
(*btn_it)->setBackgroundPixmap(m_label_unfocused_pm);
|
(*btn_it)->setBackgroundPixmap(m_label_unfocused_pm);
|
||||||
else
|
else
|
||||||
|
@ -892,6 +898,7 @@ void FbWinFrame::renderLabelButtons() {
|
||||||
m_current_label->setBackgroundPixmap(label_pm);
|
m_current_label->setBackgroundPixmap(label_pm);
|
||||||
} else
|
} else
|
||||||
m_current_label->setBackgroundColor(label_color);
|
m_current_label->setBackgroundColor(label_color);
|
||||||
|
|
||||||
m_current_label->clear();
|
m_current_label->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue