summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-05-18 13:48:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:19 +0100
commit0b5d156dee0dd362200134d1a4b1ba44d2d63970 (patch)
treee2f024f181a7f6ecf41a6c8f85c9493daa3315e9 /vcl
parent0d7cbdbeac23b6a04b4b7b6e8fd39f2a99da0f41 (diff)
implement sucking in the padding from the theme
pretty up dialogs, centralize adding the borders into VclContainer, reduce default space between buttons
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/dialog.hxx12
-rw-r--r--vcl/inc/vcl/layout.hxx14
-rw-r--r--vcl/inc/vcl/settings.hxx40
-rw-r--r--vcl/source/app/settings.cxx4
-rw-r--r--vcl/source/window/dialog.cxx70
-rw-r--r--vcl/source/window/layout.cxx81
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx49
7 files changed, 214 insertions, 56 deletions
diff --git a/vcl/inc/vcl/dialog.hxx b/vcl/inc/vcl/dialog.hxx
index a1941c29eafa..005c7e8aecc4 100644
--- a/vcl/inc/vcl/dialog.hxx
+++ b/vcl/inc/vcl/dialog.hxx
@@ -54,6 +54,7 @@ private:
sal_Bool mbOldSaveBack;
sal_Bool mbInClose;
sal_Bool mbModalMode;
+ int m_nBorderWidth;
Timer maLayoutTimer;
SAL_DLLPRIVATE void ImplInitDialogData();
@@ -89,6 +90,17 @@ public:
virtual Size GetOptimalSize(WindowSizeType eType) const;
virtual void Resize();
bool isLayoutEnabled() const;
+ virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
+
+ void set_border_width(int nBorderWidth)
+ {
+ m_nBorderWidth = nBorderWidth;
+ }
+ int get_border_width() const
+ {
+ return m_nBorderWidth;
+ }
+
virtual sal_Bool Close();
diff --git a/vcl/inc/vcl/layout.hxx b/vcl/inc/vcl/layout.hxx
index 1840fb4c67b4..c2ed2edf458a 100644
--- a/vcl/inc/vcl/layout.hxx
+++ b/vcl/inc/vcl/layout.hxx
@@ -35,13 +35,25 @@
class VCL_DLLPUBLIC VclContainer : public Window
{
public:
- VclContainer(Window *pParent) : Window(pParent) {}
+ VclContainer(Window *pParent) : Window(pParent), m_nBorderWidth(0) {}
virtual Size GetOptimalSize(WindowSizeType eType) const;
using Window::SetPosSizePixel;
virtual void SetPosSizePixel(const Point& rNewPos, const Size& rNewSize);
+ virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
+
+ void set_border_width(int nBorderWidth)
+ {
+ m_nBorderWidth = nBorderWidth;
+ }
+ int get_border_width() const
+ {
+ return m_nBorderWidth;
+ }
protected:
virtual Size calculateRequisition() const = 0;
virtual void setAllocation(const Size &rAllocation) = 0;
+private:
+ int m_nBorderWidth;
};
enum VclPackType
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index e6832af11ace..9a0a856f8eed 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -211,6 +211,34 @@ public:
{ return !(*this == rSet); }
};
+struct DialogStyle
+{
+ int content_area_border;
+ int content_area_spacing;
+ int button_spacing;
+ int action_area_border;
+ DialogStyle()
+ : content_area_border(2)
+ , content_area_spacing(0)
+ , button_spacing(6)
+ , action_area_border(5)
+ {}
+};
+
+struct FrameStyle
+{
+ int left;
+ int right;
+ int top;
+ int bottom;
+ FrameStyle()
+ : left(2)
+ , right(2)
+ , top(2)
+ , bottom(2)
+ {}
+};
+
// -----------------
// - ImplStyleData -
// -----------------
@@ -322,6 +350,8 @@ private:
sal_Bool mbHideDisabledMenuItems;
sal_Bool mnAcceleratorsInContextMenus;
Wallpaper maWorkspaceGradient;
+ DialogStyle maDialogStyle;
+ FrameStyle maFrameStyle;
const void* mpFontOptions;
};
@@ -822,6 +852,16 @@ public:
void SetWorkspaceGradient( const Wallpaper& rWall )
{ CopyData(); mpData->maWorkspaceGradient = rWall; }
+ const DialogStyle& GetDialogStyle() const
+ { return mpData->maDialogStyle; }
+ void SetDialogStyle( const DialogStyle& rStyle )
+ { CopyData(); mpData->maDialogStyle = rStyle; }
+
+ const FrameStyle& GetFrameStyle() const
+ { return mpData->maFrameStyle; }
+ void SetFrameStyle( const FrameStyle& rStyle )
+ { CopyData(); mpData->maFrameStyle = rStyle; }
+
void SetStandardStyles();
const StyleSettings& operator =( const StyleSettings& rSet );
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 4eb63b582476..a18a9dabd425 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -302,7 +302,9 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
maFieldFont( rData.maFieldFont ),
maIconFont( rData.maIconFont ),
maGroupFont( rData.maGroupFont ),
- maWorkspaceGradient( rData.maWorkspaceGradient )
+ maWorkspaceGradient( rData.maWorkspaceGradient ),
+ maDialogStyle( rData.maDialogStyle ),
+ maFrameStyle( rData.maFrameStyle )
{
mnRefCount = 1;
mnBorderSize = rData.mnBorderSize;
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index d1e36edc31c9..ef0e65507a93 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -194,19 +194,30 @@ void ImplWindowAutoMnemonic( Window* pWindow )
}
}
-static Window* getActionAreaButtonList(Dialog *pDialog)
+static VclButtonBox* getActionArea(Dialog *pDialog)
{
- Window* pChild;
+ VclButtonBox *pButtonBox = NULL;
if (pDialog->isLayoutEnabled())
{
- VclBox *pBox = dynamic_cast<VclBox*>(pDialog->GetWindow(WINDOW_FIRSTCHILD));
- VclButtonBox *pButtonBox = pBox ?
- dynamic_cast<VclButtonBox*>(pBox->GetWindow(WINDOW_LASTCHILD)) : 0;
- pChild = pButtonBox ? pButtonBox->GetWindow(WINDOW_FIRSTCHILD) : 0;
+ Window *pBox = pDialog->GetWindow(WINDOW_FIRSTCHILD);
+ Window *pChild = pBox->GetWindow(WINDOW_LASTCHILD);
+ while (pChild)
+ {
+ pButtonBox = dynamic_cast<VclButtonBox*>(pChild);
+ if (pButtonBox)
+ break;
+ pChild = pChild->GetWindow(WINDOW_PREV);
+ }
}
- else
- pChild = pDialog->GetWindow( WINDOW_FIRSTCHILD );
- return pChild;
+ return pButtonBox;
+}
+
+static Window* getActionAreaButtonList(Dialog *pDialog)
+{
+ VclButtonBox* pButtonBox = getActionArea(pDialog);
+ if (pButtonBox)
+ return pButtonBox->GetWindow(WINDOW_FIRSTCHILD);
+ return pDialog->GetWindow(WINDOW_FIRSTCHILD);
}
// =======================================================================
@@ -309,6 +320,7 @@ void Dialog::ImplInitDialogData()
mbInClose = sal_False;
mbModalMode = sal_False;
mnMousePositioned = 0;
+ m_nBorderWidth = 0;
mpDialogImpl = new DialogImpl;
//To-Do, reuse maResizeTimer
@@ -417,7 +429,6 @@ void Dialog::ImplInitSettings()
// fallback to settings color
else
SetBackground( GetSettings().GetStyleSettings().GetDialogColor() );
-
}
// -----------------------------------------------------------------------
@@ -518,6 +529,8 @@ void Dialog::StateChanged( StateChangedType nType )
//resize dialog to fit requisition on initial show
const Window *pContainer = GetWindow(WINDOW_FIRSTCHILD);
Size aSize = pContainer->get_preferred_size();
+ aSize.Height() += 2*m_nBorderWidth;
+ aSize.Width() += 2*m_nBorderWidth;
Size aMax = GetOptimalSize(WINDOWSIZE_MAXIMUM);
aSize.Width() = std::min(aMax.Width(), aSize.Width());
@@ -1019,17 +1032,35 @@ Size Dialog::GetOptimalSize(WindowSizeType eType) const
return SystemWindow::GetOptimalSize(eType);
Size aSize = GetWindow(WINDOW_FIRSTCHILD)->GetOptimalSize(eType);
+ aSize.Height() += 2*m_nBorderWidth;
+ aSize.Width() += 2*m_nBorderWidth;
return Window::CalcWindowSize(aSize);
}
IMPL_LINK( Dialog, ImplHandleLayoutTimerHdl, void*, EMPTYARG )
{
- assert(isLayoutEnabled());
+ VclBox *pBox = dynamic_cast<VclBox*>(GetWindow(WINDOW_FIRSTCHILD));
Size aSize = GetSizePixel();
- aSize.Width() -= mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder;
- aSize.Height() -= mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder;
- Point aPos(mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder);
- GetWindow(WINDOW_FIRSTCHILD)->SetPosSizePixel(aPos, aSize);
+ aSize.Width() -= mpWindowImpl->mnLeftBorder + mpWindowImpl->mnRightBorder
+ + 2 * m_nBorderWidth;
+ aSize.Height() -= mpWindowImpl->mnTopBorder + mpWindowImpl->mnBottomBorder
+ + 2 * m_nBorderWidth;
+ Point aPos(mpWindowImpl->mnLeftBorder + m_nBorderWidth,
+ mpWindowImpl->mnTopBorder + m_nBorderWidth);
+
+ const DialogStyle& rDialogStyle =
+ GetSettings().GetStyleSettings().GetDialogStyle();
+ pBox->set_border_width(rDialogStyle.content_area_border);
+ pBox->set_spacing(rDialogStyle.content_area_spacing);
+
+ VclButtonBox *pActionArea = getActionArea(this);
+ if (pActionArea)
+ {
+ pActionArea->set_border_width(rDialogStyle.action_area_border);
+ pActionArea->set_spacing(rDialogStyle.button_spacing);
+ }
+
+ pBox->SetPosSizePixel(aPos, aSize);
return 0;
}
@@ -1044,6 +1075,15 @@ void Dialog::Resize()
maLayoutTimer.Start();
}
+bool Dialog::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+{
+ if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("border-width")))
+ set_border_width(rValue.toInt32());
+ else
+ return SystemWindow::set_property(rKey, rValue);
+ return true;
+}
+
// -----------------------------------------------------------------------
ModelessDialog::ModelessDialog( Window* pParent, const ResId& rResId ) :
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index b3789a5ba6b9..ef3120115e83 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -33,13 +33,34 @@ Size VclContainer::GetOptimalSize(WindowSizeType eType) const
{
if (eType == WINDOWSIZE_MAXIMUM)
return Window::GetOptimalSize(eType);
- return calculateRequisition();
+
+ Size aSize = calculateRequisition();
+ aSize.Width() += m_nBorderWidth*2;
+ aSize.Height() += m_nBorderWidth*2;
+ return aSize;
}
void VclContainer::SetPosSizePixel(const Point& rAllocPos, const Size& rAllocation)
{
- Window::SetPosSizePixel(rAllocPos, rAllocation);
- setAllocation(rAllocation);
+ Size aAllocation = rAllocation;
+ aAllocation.Width() -= m_nBorderWidth*2;
+ aAllocation.Height() -= m_nBorderWidth*2;
+
+ Point aAllocPos = rAllocPos;
+ aAllocPos.X() += m_nBorderWidth;
+ aAllocPos.Y() += m_nBorderWidth;
+
+ Window::SetPosSizePixel(aAllocPos, aAllocation);
+ setAllocation(aAllocation);
+}
+
+bool VclContainer::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+{
+ if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("border-width")))
+ set_border_width(rValue.toInt32());
+ else
+ return Window::set_property(rKey, rValue);
+ return true;
}
Size VclBox::calculateRequisition() const
@@ -79,12 +100,6 @@ Size VclBox::calculateRequisition() const
setPrimaryDimension(aSize, nPrimaryDimension + m_nSpacing * (nVisibleChildren-1));
}
- rtl::OString sBorderWidth(RTL_CONSTASCII_STRINGPARAM("border-width"));
- sal_Int32 nBorderWidth = getWidgetProperty<sal_Int32>(sBorderWidth);
-
- aSize.Width() += nBorderWidth*2;
- aSize.Height() += nBorderWidth*2;
-
return aSize;
}
@@ -106,16 +121,9 @@ void VclBox::setAllocation(const Size &rAllocation)
if (!nVisibleChildren)
return;
- rtl::OString sBorderWidth(RTL_CONSTASCII_STRINGPARAM("border-width"));
- sal_Int32 nBorderWidth = getWidgetProperty<sal_Int32>(sBorderWidth);
-
- Size aAllocation = rAllocation;
- aAllocation.Width() -= nBorderWidth*2;
- aAllocation.Height() -= nBorderWidth*2;
-
- long nAllocPrimaryDimension = getPrimaryDimension(aAllocation);
+ long nAllocPrimaryDimension = getPrimaryDimension(rAllocation);
- long nHomogeneousDimension, nExtraSpace = 0;
+ long nHomogeneousDimension = 0, nExtraSpace = 0;
if (m_bHomogeneous)
{
nHomogeneousDimension = ((nAllocPrimaryDimension -
@@ -124,9 +132,7 @@ void VclBox::setAllocation(const Size &rAllocation)
else if (nExpandChildren)
{
Size aRequisition = calculateRequisition();
- aRequisition.Width() -= nBorderWidth*2;
- aRequisition.Height() -= nBorderWidth*2;
- nExtraSpace = (getPrimaryDimension(aAllocation) - getPrimaryDimension(aRequisition)) / nExpandChildren;
+ nExtraSpace = (getPrimaryDimension(rAllocation) - getPrimaryDimension(aRequisition)) / nExpandChildren;
}
rtl::OString sPadding(RTL_CONSTASCII_STRINGPARAM("padding"));
@@ -135,7 +141,7 @@ void VclBox::setAllocation(const Size &rAllocation)
for (sal_Int32 ePackType = VCL_PACK_START; ePackType <= VCL_PACK_END; ++ePackType)
{
- Point aPos(nBorderWidth, nBorderWidth);
+ Point aPos(0, 0);
if (ePackType == VCL_PACK_END)
{
long nPrimaryCoordinate = getPrimaryCoordinate(aPos);
@@ -166,7 +172,7 @@ void VclBox::setAllocation(const Size &rAllocation)
if (bExpand)
setPrimaryDimension(aBoxSize, nPrimaryDimension + nExtraSpace);
}
- setSecondaryDimension(aBoxSize, getSecondaryDimension(aAllocation));
+ setSecondaryDimension(aBoxSize, getSecondaryDimension(rAllocation));
Point aChildPos(aPos);
Size aChildSize(aBoxSize);
@@ -211,7 +217,7 @@ bool VclBox::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("homogeneous")))
set_homogeneous(toBool(rValue));
else
- return Window::set_property(rKey, rValue);
+ return VclContainer::set_property(rKey, rValue);
return true;
}
@@ -277,12 +283,6 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
if (!nVisibleChildren)
return;
- rtl::OString sChildInternalPadX(RTL_CONSTASCII_STRINGPARAM("child-internal-pad-x"));
- sal_Int32 nChildInternalPadX = getWidgetStyleProperty<sal_Int32>(sChildInternalPadX, DEFAULT_CHILD_INTERNAL_PAD_X);
- rtl::OString sChildInternalPadY(RTL_CONSTASCII_STRINGPARAM("child-internal-pad-y"));
- sal_Int32 nChildInternalPadY = getWidgetStyleProperty<sal_Int32>(sChildInternalPadY, DEFAULT_CHILD_INTERNAL_PAD_Y);
- Size aChildPad(nChildInternalPadX, nChildInternalPadY);
-
Size aSize = rAllocation;
long nAllocPrimaryDimension = getPrimaryDimension(rAllocation);
@@ -290,9 +290,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
long nHomogeneousDimension = ((getPrimaryDimension(aRequisition) -
(nVisibleChildren - 1) * m_nSpacing)) / nVisibleChildren;
- nHomogeneousDimension = nHomogeneousDimension - getPrimaryDimension(aChildPad) * 2;
-
- Point aPos(nChildInternalPadX, nChildInternalPadY);
+ Point aPos(0, 0);
long nPrimaryCoordinate = getPrimaryCoordinate(aPos);
setPrimaryCoordinate(aPos, nPrimaryCoordinate + nAllocPrimaryDimension
- getPrimaryDimension(aRequisition));
@@ -309,8 +307,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
pChild->SetPosSizePixel(aPos, aChildSize);
nPrimaryCoordinate = getPrimaryCoordinate(aPos);
- setPrimaryCoordinate(aPos, nPrimaryCoordinate + nHomogeneousDimension + m_nSpacing +
- getPrimaryDimension(aChildPad) * 2);
+ setPrimaryCoordinate(aPos, nPrimaryCoordinate + nHomogeneousDimension + m_nSpacing);
}
}
@@ -554,7 +551,6 @@ Size VclFrame::calculateRequisition() const
if (pChild && pChild->IsVisible())
aRet = pChild->GetOptimalSize(WINDOWSIZE_PREFERRED);
- //To-Do, padding, borders, from style/theme
if (pLabel && pLabel->IsVisible())
{
Size aLabelSize = pLabel->GetOptimalSize(WINDOWSIZE_PREFERRED);
@@ -562,13 +558,21 @@ Size VclFrame::calculateRequisition() const
aRet.Width() = std::max(aLabelSize.Width(), aRet.Width());
}
+ const FrameStyle &rFrameStyle =
+ GetSettings().GetStyleSettings().GetFrameStyle();
+ aRet.Width() += rFrameStyle.left + rFrameStyle.right;
+ aRet.Height() += rFrameStyle.top + rFrameStyle.bottom;
+
return aRet;
}
void VclFrame::setAllocation(const Size &rAllocation)
{
- Size aAllocation(rAllocation);
- Point aChildPos(0, 0);
+ const FrameStyle &rFrameStyle =
+ GetSettings().GetStyleSettings().GetFrameStyle();
+ Size aAllocation(rAllocation.Width() - rFrameStyle.left - rFrameStyle.right,
+ rAllocation.Height() - rFrameStyle.top - rFrameStyle.bottom);
+ Point aChildPos(rFrameStyle.left, rFrameStyle.top);
WindowImpl* pWindowImpl = ImplGetWindowImpl();
@@ -578,7 +582,6 @@ void VclFrame::setAllocation(const Size &rAllocation)
if (pLabel && pLabel->IsVisible())
{
- //To-Do, borders etc.
Size aLabelSize = pLabel->GetOptimalSize(WINDOWSIZE_PREFERRED);
aLabelSize.Height() = std::min(aLabelSize.Height(), aAllocation.Height());
aLabelSize.Width() = std::min(aLabelSize.Width(), aAllocation.Width());
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index da3cc507ddc7..cf84f8cd9eeb 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -111,6 +111,8 @@ struct NWFWidgetData
GtkWidget * gHScale;
GtkWidget * gVScale;
GtkWidget * gSeparator;
+ GtkWidget * gDialog;
+ GtkWidget * gFrame;
NWPixmapCacheList* gNWPixmapCacheList;
NWPixmapCache* gCacheTabItems;
@@ -150,6 +152,8 @@ struct NWFWidgetData
gHScale( NULL ),
gVScale( NULL ),
gSeparator( NULL ),
+ gDialog( NULL ),
+ gFrame( NULL ),
gNWPixmapCacheList( NULL ),
gCacheTabItems( NULL ),
gCacheTabPages( NULL )
@@ -192,6 +196,8 @@ static void NWEnsureGTKToolbar ( SalX11Screen nScreen );
static void NWEnsureGTKMenubar ( SalX11Screen nScreen );
static void NWEnsureGTKMenu ( SalX11Screen nScreen );
static void NWEnsureGTKTooltip ( SalX11Screen nScreen );
+static void NWEnsureGTKDialog ( SalX11Screen nScreen );
+static void NWEnsureGTKFrame ( SalX11Screen nScreen );
static void NWEnsureGTKProgressBar ( SalX11Screen nScreen );
static void NWEnsureGTKTreeView ( SalX11Screen nScreen );
static void NWEnsureGTKSlider ( SalX11Screen nScreen );
@@ -490,6 +496,8 @@ void GtkData::deInitNWF( void )
gtk_widget_destroy( gWidgetData[i].gMenuWidget );
if( gWidgetData[i].gTooltipPopup )
gtk_widget_destroy( gWidgetData[i].gTooltipPopup );
+ if( gWidgetData[i].gDialog )
+ gtk_widget_destroy( gWidgetData[i].gDialog );
delete gWidgetData[i].gCacheTabPages;
gWidgetData[i].gCacheTabPages = NULL;
delete gWidgetData[i].gCacheTabItems;
@@ -3716,6 +3724,8 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
NWEnsureGTKScrollbars( m_nXScreen );
NWEnsureGTKEditBox( m_nXScreen );
NWEnsureGTKTooltip( m_nXScreen );
+ NWEnsureGTKDialog( m_nXScreen );
+ NWEnsureGTKFrame( m_nXScreen );
#if OSL_DEBUG_LEVEL > 2
printStyleColors( pStyle );
@@ -3737,6 +3747,22 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aTextColor = getColor( pTooltipStyle->fg[ GTK_STATE_NORMAL ] );
aStyleSet.SetHelpTextColor( aTextColor );
+ DialogStyle aDialogStyle(aStyleSet.GetDialogStyle());
+ gtk_widget_style_get (gWidgetData[m_nXScreen].gDialog,
+ "content-area-border", &aDialogStyle.content_area_border,
+ "content-area-spacing", &aDialogStyle.content_area_spacing,
+ "button-spacing", &aDialogStyle.button_spacing,
+ "action-area-border", &aDialogStyle.action_area_border,
+ NULL);
+ aStyleSet.SetDialogStyle(aDialogStyle);
+
+ FrameStyle aFrameStyle(aStyleSet.GetFrameStyle());
+ aFrameStyle.left = aFrameStyle.right =
+ gWidgetData[m_nXScreen].gFrame->style->xthickness;
+ aFrameStyle.top = aFrameStyle.bottom =
+ gWidgetData[m_nXScreen].gFrame->style->ythickness;
+ aStyleSet.SetFrameStyle(aFrameStyle);
+
// mouse over text colors
aTextColor = getColor( pStyle->fg[ GTK_STATE_PRELIGHT ] );
aStyleSet.SetButtonRolloverTextColor( aTextColor );
@@ -4411,6 +4437,29 @@ static void NWEnsureGTKTooltip( SalX11Screen nScreen )
}
}
+static void NWEnsureGTKDialog( SalX11Screen nScreen )
+{
+ if( !gWidgetData[nScreen].gDialog )
+ {
+ gWidgetData[nScreen].gDialog = gtk_dialog_new();
+ GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(),
+ nScreen.getXScreen() );
+ if( pScreen )
+ gtk_window_set_screen( GTK_WINDOW(gWidgetData[nScreen].gDialog), pScreen );
+ gtk_widget_realize(gWidgetData[nScreen].gDialog);
+ gtk_widget_ensure_style(gWidgetData[nScreen].gDialog);
+ }
+}
+
+static void NWEnsureGTKFrame( SalX11Screen nScreen )
+{
+ if( !gWidgetData[nScreen].gFrame )
+ {
+ gWidgetData[nScreen].gFrame = gtk_frame_new(NULL);
+ NWAddWidgetToCacheWindow( gWidgetData[nScreen].gFrame, nScreen );
+ }
+}
+
static void NWEnsureGTKProgressBar( SalX11Screen nScreen )
{
if( !gWidgetData[nScreen].gProgressBar )