Compare commits
33 Commits
wip/cssnod
...
wip/csd-fo
Author | SHA1 | Date | |
---|---|---|---|
|
02af9b37ff | ||
|
562476ca18 | ||
|
ee100f16c3 | ||
|
c15a76c6e1 | ||
|
af14695875 | ||
|
55e90683a6 | ||
|
2ee63a5c01 | ||
|
e94191beb3 | ||
|
c55966e0fd | ||
|
91abc52311 | ||
|
88263b9357 | ||
|
5c672650ea | ||
|
16a89d3cee | ||
|
1ce4b79edc | ||
|
acc912755e | ||
|
3c3d91fbc8 | ||
|
c3c86140ee | ||
|
c6a832009e | ||
|
fa1b2018cf | ||
|
adc0db0139 | ||
|
d93f3c9b74 | ||
|
6ca5b8a770 | ||
|
14db43c68b | ||
|
74cd6de409 | ||
|
ca849344f1 | ||
|
059c3704c9 | ||
|
dc35f16aa9 | ||
|
5a41fcf2b4 | ||
|
cde87b4106 | ||
|
97c57f9359 | ||
|
0331c16af9 | ||
|
5cf4353a6f | ||
|
1b2b351e2d |
@@ -257,6 +257,7 @@ gtk_public_h_sources = \
|
||||
gtkfontchooserwidget.h \
|
||||
gtkframe.h \
|
||||
gtkgrid.h \
|
||||
gtkheaderbar.h \
|
||||
gtkiconfactory.h \
|
||||
gtkicontheme.h \
|
||||
gtkiconview.h \
|
||||
@@ -729,6 +730,7 @@ gtk_base_c_sources = \
|
||||
gtkfontchooserwidget.c \
|
||||
gtkframe.c \
|
||||
gtkgrid.c \
|
||||
gtkheaderbar.c \
|
||||
gtkhsla.c \
|
||||
gtkiconcache.c \
|
||||
gtkiconcachevalidator.c \
|
||||
|
@@ -23,6 +23,9 @@
|
||||
color: @fg_color;
|
||||
border-color: shade (@bg_color, 0.6);
|
||||
padding: 2px;
|
||||
-GtkWindow-resize-grip-width: 0;
|
||||
-GtkWindow-resize-grip-height: 0;
|
||||
-GtkWindow-decoration-button-layout: 'icon:minimize,maximize,close';
|
||||
}
|
||||
|
||||
GtkWindow, .button, .slider {
|
||||
@@ -729,3 +732,73 @@ GtkCalendar.button:hover {
|
||||
-gtk-gradient(radial, center center, 0, center center, 0.5, to(currentColor), to(transparent));
|
||||
animation: spinner 1s infinite linear;
|
||||
}
|
||||
|
||||
/* Client side decorations */
|
||||
.titlebar > GtkLabel:backdrop {
|
||||
color: darker (@bg_color);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.titlebar GtkLabel {
|
||||
font: Sans Bold 10;
|
||||
text-shadow: 1px 1px lighter (@bg_color);
|
||||
}
|
||||
|
||||
.titlebar GtkButton:backdrop {
|
||||
border-image: none;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.titlebar GtkButton GtkLabel:backdrop {
|
||||
text-shadow: none;
|
||||
color: darker (@bg_color);
|
||||
}
|
||||
|
||||
.titlebar GtkButton GtkLabel {
|
||||
font: Sans Bold 12;
|
||||
color: white;
|
||||
text-shadow: 0px 1px darker (darker (@bg_color));
|
||||
}
|
||||
|
||||
.titlebar GtkButton {
|
||||
border-style: none;
|
||||
border-color: darker (@bg_color);
|
||||
|
||||
background-image: -gtk-gradient (linear, center top, center bottom,
|
||||
from (@bg_color),
|
||||
color-stop (0.5, darker (@bg_color)),
|
||||
to (@bg_color));
|
||||
}
|
||||
|
||||
.titlebar GtkButton:first-child {
|
||||
border-radius: 10px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.titlebar GtkButton:last-child {
|
||||
border-radius: 0px 10px 0px 0px;
|
||||
}
|
||||
|
||||
.titlebar:backdrop {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.titlebar {
|
||||
background-image: -gtk-gradient (linear, center top, center bottom,
|
||||
from (white),
|
||||
to (@bg_color));
|
||||
border-radius: 5px 5px 0px 0px;
|
||||
}
|
||||
|
||||
.window-border {
|
||||
border-color: darker (@bg_color);
|
||||
border-radius: 10px;
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.window-outer-border {
|
||||
border-color: transparent;
|
||||
border-radius: 10px;
|
||||
border-width: 10px 10px 10px 10px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
@@ -108,6 +108,7 @@
|
||||
#include <gtk/gtkfontchooserwidget.h>
|
||||
#include <gtk/gtkframe.h>
|
||||
#include <gtk/gtkgrid.h>
|
||||
#include <gtk/gtkheaderbar.h>
|
||||
#include <gtk/gtkiconfactory.h>
|
||||
#include <gtk/gtkicontheme.h>
|
||||
#include <gtk/gtkiconview.h>
|
||||
|
@@ -703,13 +703,17 @@ gtk_application_window_real_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (window->priv->menubar != NULL)
|
||||
{
|
||||
GtkAllocation menubar_allocation = *allocation;
|
||||
GtkAllocation menubar_allocation;
|
||||
GtkAllocation child_allocation;
|
||||
gint menubar_height;
|
||||
GtkWidget *child;
|
||||
|
||||
_gtk_window_set_allocation (GTK_WINDOW (widget), allocation);
|
||||
_gtk_window_set_allocation (GTK_WINDOW (widget), allocation, &child_allocation);
|
||||
menubar_allocation = child_allocation;
|
||||
|
||||
gtk_widget_get_preferred_height_for_width (window->priv->menubar, allocation->width, &menubar_height, NULL);
|
||||
gtk_widget_get_preferred_height_for_width (window->priv->menubar,
|
||||
menubar_allocation.width,
|
||||
&menubar_height, NULL);
|
||||
|
||||
menubar_allocation.height = menubar_height;
|
||||
gtk_widget_size_allocate (window->priv->menubar, &menubar_allocation);
|
||||
@@ -717,7 +721,6 @@ gtk_application_window_real_size_allocate (GtkWidget *widget,
|
||||
child = gtk_bin_get_child (GTK_BIN (window));
|
||||
if (child != NULL && gtk_widget_get_visible (child))
|
||||
{
|
||||
GtkAllocation child_allocation = *allocation;
|
||||
gint border_width;
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (window));
|
||||
|
1154
gtk/gtkheaderbar.c
Normal file
1154
gtk/gtkheaderbar.c
Normal file
File diff suppressed because it is too large
Load Diff
76
gtk/gtkheaderbar.h
Normal file
76
gtk/gtkheaderbar.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __GTK_HEADER_BAR_H__
|
||||
#define __GTK_HEADER_BAR_H__
|
||||
|
||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkcontainer.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_HEADER_BAR (gtk_header_bar_get_type ())
|
||||
#define GTK_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HEADER_BAR, GtkHeaderBar))
|
||||
#define GTK_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HEADER_BAR, GtkHeaderBarClass))
|
||||
#define GTK_IS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HEADER_BAR))
|
||||
#define GTK_IS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HEADER_BAR))
|
||||
#define GTK_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HEADER_BAR, GtkHeaderBarClass))
|
||||
|
||||
typedef struct _GtkHeaderBar GtkHeaderBar;
|
||||
typedef struct _GtkHeaderBarPrivate GtkHeaderBarPrivate;
|
||||
typedef struct _GtkHeaderBarClass GtkHeaderBarClass;
|
||||
|
||||
struct _GtkHeaderBar
|
||||
{
|
||||
GtkContainer container;
|
||||
|
||||
/*< private >*/
|
||||
GtkHeaderBarPrivate *priv;
|
||||
};
|
||||
|
||||
struct _GtkHeaderBarClass
|
||||
{
|
||||
GtkContainerClass parent_class;
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_gtk_reserved1) (void);
|
||||
void (*_gtk_reserved2) (void);
|
||||
void (*_gtk_reserved3) (void);
|
||||
void (*_gtk_reserved4) (void);
|
||||
};
|
||||
|
||||
GType gtk_header_bar_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget *gtk_header_bar_new (void);
|
||||
void gtk_header_bar_set_title (GtkHeaderBar *bar,
|
||||
const gchar *title);
|
||||
const gchar *gtk_header_bar_get_title (GtkHeaderBar *bar);
|
||||
void gtk_header_bar_set_custom_title (GtkHeaderBar *bar,
|
||||
GtkWidget *title_widget);
|
||||
GtkWidget *gtk_header_bar_get_custom_title (GtkHeaderBar *bar);
|
||||
void gtk_header_bar_pack_start (GtkHeaderBar *bar,
|
||||
GtkWidget *child);
|
||||
void gtk_header_bar_pack_end (GtkHeaderBar *bar,
|
||||
GtkWidget *child);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_HEADER_BAR_H__ */
|
1433
gtk/gtkwindow.c
1433
gtk/gtkwindow.c
File diff suppressed because it is too large
Load Diff
@@ -66,8 +66,9 @@ void _gtk_window_get_wmclass (GtkWindow *window,
|
||||
gchar **wmclass_name,
|
||||
gchar **wmclass_class);
|
||||
|
||||
void _gtk_window_set_allocation (GtkWindow *window,
|
||||
GtkAllocation *allocation);
|
||||
void _gtk_window_set_allocation (GtkWindow *window,
|
||||
const GtkAllocation *allocation,
|
||||
GtkAllocation *allocation_out);
|
||||
|
||||
typedef void (*GtkWindowKeysForeachFunc) (GtkWindow *window,
|
||||
guint keyval,
|
||||
|
Reference in New Issue
Block a user