AdwNavigationView is a new widget meant to be used specifically for navigation, unlike AdwLeaflet which was multipurpose. AdwNavigationView provides a cleaner API and gives us automatic titles, back buttons, gestures, actions, and windowcontrols. AdwToolbarView is a utility widget that simplifies setting the top and bottom bars for simple views, giving us styling with undershoots, the ability to use flat headers in scrolling views, and proper styling when used with the new sidebar widgets. This commit ports the Accessibility panel to AdwNavigationView and AdwToolbarView. Subpages now subclass AdwNavigationPage and contain toolbar views - meaning their headers are joined with their content. Their titles and their back buttons are automatically handled by libadwaita, with proper accessibility. The actions provided by AdwNavigationPage allow us to remove the custom listbox we used for the `row-activated` signal. Rows now use the `navigation.push` action in order to push a subpage by tag. Currently our AdwToolbarViews use the `raised` style, as we have not ported to the new sidebar widget yet.
39 lines
1.2 KiB
C
39 lines
1.2 KiB
C
/* -*- mode: c; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
*
|
|
* Copyright 2022 Purism SPC
|
|
*
|
|
* Licensed under the GNU General Public License Version 2
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU 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 General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*
|
|
* Author(s):
|
|
* Mohammed Sadiq <sadiq@sadiqpk.org>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <adwaita.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define CC_TYPE_UA_SEEING_PAGE (cc_ua_seeing_page_get_type ())
|
|
|
|
G_DECLARE_FINAL_TYPE (CcUaSeeingPage, cc_ua_seeing_page, CC, UA_SEEING_PAGE, AdwNavigationPage)
|
|
|
|
GtkWidget *cc_ua_seeing_page_new (void);
|
|
|
|
G_END_DECLS
|