GNOME Bugzilla – Bug 750338
gtkrevealer: add css padding support
Last modified: 2015-06-05 03:41:45 UTC
See patch, necesary for the work on GtkPlacesSidebar to port it to GtkListBox
Created attachment 304510 [details] [review] gtkrevealer: add css padding support Add css padding support to GtkRevealer. As a future work, GtkRevealer still needs to support the border property.
Created attachment 304520 [details] [review] gtkrevealer: add css padding support Add css padding support to GtkRevealer. As a future work, GtkRevealer still needs to support the border property.
Review of attachment 304520 [details] [review]: ::: gtk/gtkrevealer.c @@ +1,3 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* + * Copyright (c) 2013, 2015 Red Hat, Inc. Pet peeve: remove the '(c)'. It means 'Copyright', which makes the line: Copyright Copyright 2013, 2015 … @@ +118,2 @@ static void +gtk_revealer_get_full_border (GtkRevealer *revealer, It's a bit confusing to call this function 'get_full_border' and yet only get the padding. Shouldn't it also get the border? @@ +330,1 @@ child_allocation->x = 0; This should probably have a comment pointing to real_size_allocate() as well. @@ +517,2 @@ transition = effective_transition (revealer); + /* The child allocation is fixed (it's doesn't modifies with the animation), "it is not modified by the animation" @@ +517,3 @@ transition = effective_transition (revealer); + /* The child allocation is fixed (it's doesn't modifies with the animation), + * and it's added to the bin_window at 0,0. "and its origin is relative to bin_window"
Created attachment 304528 [details] [review] gtkrevealer: add css padding support Add css padding support to GtkRevealer. As a future work, GtkRevealer still needs to support the border property.
About the border/padding, it's true, the border property is not supported currently, so you are right the name is odd... About everything else, thanks for the review, had a hard time making that comment for the next one hacking on GtkRevealer. Also I improved a little the code (extract of the set_width) and also make sure we never ask for a width/height less than 0 when subtracting the paddings.
Trying this with tests/testrevealer shows some oddities: 1) The buttons at the bottom appear to hang out of the window by 1 pixel or so 2) When setting padding to 10, the top two buttons don't change their height, the others do. The 'None' button grows once it is clicked.
Attachment 304528 [details] pushed as c37f569 - gtkrevealer: add css padding support