Browse Source

expose drawing area and remove custom frame and label

master
Alexandros Theodotou 3 years ago
parent
commit
1b0b2d96ae
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 3
      inc/ztoolkit/ztk.h
  2. 1
      src/meson.build
  3. 5
      src/ztk_app.c
  4. 4
      src/ztk_drawing_area.c

3
inc/ztoolkit/ztk.h

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU General Affero Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* along with ZToolkit. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __Z_TOOLKIT_ZTK_H__
@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
#include "ztoolkit/ztk_app.h"
#include "ztoolkit/ztk_color.h"
#include "ztoolkit/ztk_drawing_area.h"
#include "ztoolkit/ztk_knob.h"
#include "ztoolkit/ztk_knob_with_label.h"
#include "ztoolkit/ztk_label.h"

1
src/meson.build

@ -19,6 +19,7 @@ ztoolkit_srcs = files([ @@ -19,6 +19,7 @@ ztoolkit_srcs = files([
'log.c',
'ztk_app.c',
'ztk_color.c',
'ztk_drawing_area.c',
'ztk_knob.c',
'ztk_knob_with_label.c',
'ztk_label.c',

5
src/ztk_app.c

@ -51,10 +51,12 @@ on_expose ( @@ -51,10 +51,12 @@ on_expose (
cairo_t* cr = (cairo_t*)puglGetContext(view);
// Draw background
const PuglRect frame = puglGetFrame(view);
const double width = frame.width;
const double height = frame.height;
#if 0
// Draw background
ztk_color_set_for_cairo (
&self->theme.bg_dark_variant2, cr);
cairo_rectangle(cr, 0, 0, width, height);
@ -79,6 +81,7 @@ on_expose ( @@ -79,6 +81,7 @@ on_expose (
padding * 2.3 + extents.height);
cairo_set_source_rgba(cr, 1, 1, 1, 1);
cairo_show_text(cr, lbl);
#endif
// Scale to view size
const double scaleX =

4
src/ztk_drawing_area.c

@ -17,6 +17,8 @@ @@ -17,6 +17,8 @@
* along with ZToolkit. If not, see <https://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include "ztoolkit/ztk_drawing_area.h"
static void
@ -74,5 +76,3 @@ ztk_drawing_area_new ( @@ -74,5 +76,3 @@ ztk_drawing_area_new (
return self;
}
#endif

Loading…
Cancel
Save