* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
/* TODO
* - touch
- * - accessible color names
* - accessible relations for popups
- * - api to replace palette
* - saving per-application (?)
- * - better checkmark
- * - use css for swatches
* - better popup theming
*/
#include "gtkadjustment.h"
#include "gtklabel.h"
#include "gtkspinbutton.h"
-#include "gtkalignment.h"
#include "gtkintl.h"
+#include "gtkstylecontext.h"
#include <math.h>
{
GtkWidget *popup;
- popup = gtk_alignment_new (0.5, 0.5, 0, 0);
- gtk_alignment_set_padding (GTK_ALIGNMENT (popup), 12, 12, 12, 12);
- gtk_style_context_add_class (gtk_widget_get_style_context (popup), GTK_STYLE_CLASS_TOOLTIP);
+ g_object_set (contents, "margin", 12, NULL);
+ popup = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_style_context_add_class (gtk_widget_get_style_context (popup), GTK_STYLE_CLASS_TOOLTIP);
gtk_container_add (GTK_CONTAINER (popup), contents);
- gtk_widget_show_all (popup);
- gtk_widget_hide (popup);
+ gtk_widget_show_all (contents);
gtk_widget_set_no_show_all (popup, TRUE);
g_signal_connect (popup, "draw", G_CALLBACK (popup_draw), editor);
/* Construct the main UI */
editor->priv->swatch = swatch = gtk_color_swatch_new ();
+ gtk_color_swatch_set_selectable (GTK_COLOR_SWATCH (editor->priv->swatch), FALSE);
gtk_widget_set_events (swatch, gtk_widget_get_events (swatch)
& ~(GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK