GTKMM-4.0 app looks like GTKMM-3.0 app

I am a c++ programmer with average knowledge in gtkmm. I am developing a little application for my college project and the app is built against gtkmm-4.0 using CMake, but my application looks like a gtk3 application. Here is the image of how it looks

and here is my cmake file

cmake_minimum_required(VERSION 3.10)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTKMM REQUIRED gtkmm-4.0)
pkg_check_modules(GLIBMM REQUIRED glibmm-2.68)
message("Compiler Version: ${CMAKE_CXX_COMPILER_VERSION}")
add_executable(${PROJECT_NAME} ${sources} ${headers})
target_link_libraries(${PROJECT_NAME} ${GTKMM_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${GLIBMM_LIBRARIES})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/include)

in cmake file you can see that i linked gtkmm-4.0 using pkg conf
pkg_check_modules(GTKMM REQUIRED gtkmm-4.0)

I also built other project that uses gtkmm-4.0 and that application also looks like gtk3 app and i also provided the Link for downloaded app

Link for my app
My system is endeavour os - arch based distro, with gnome 42

What are you expecting it to look like? The default GTK4 theme looks very similar to GTK3’s Adwaita - see the following screenshot of the demo for an example:

If you want your app to look like a modern GNOME app, you will need to use libadwaita:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.