Skip to content

Commit

Permalink
tweaks to latest mauikit change. restore calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
milohr committed Mar 19, 2024
1 parent abe5e68 commit 8272456
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 19 deletions.
7 changes: 4 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ find_package(KF6 ${REQUIRED_KF_VERSION} REQUIRED COMPONENTS
Config
Service)

find_package(MauiKit4)
find_package(MauiMan4)
find_package(CaskServer)
find_package(MauiKit4 REQUIRED COMPONENTS Calendar)
find_package(MauiMan4 REQUIRED)
find_package(CaskServer REQUIRED)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
Expand Down Expand Up @@ -125,6 +125,7 @@ qt_add_qml_module(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PRIVATE
MauiKit4
MauiKit4::Calendar
MauiMan4
# CaskLib
CaskServer::CaskServerLib
Expand Down
6 changes: 5 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
#include <unistd.h>

#include <MauiKit4/Core/mauiapp.h>
#include <KLocalizedString>
#include <MauiKit4/Calendar/moduleinfo.h>

#include <KLocalizedString>

//models and controllers by Cask
#include "code/controllers/zpaces.h"
Expand Down Expand Up @@ -261,6 +262,9 @@ int main(int argc, char *argv[])
about.setOrganizationDomain(CASK_URI);
about.setProgramLogo(app.windowIcon());

const auto FBData = MauiKitCalendar::aboutData();
about.addComponent(FBData.name(), MauiKitCalendar::buildVersion(), FBData.version(), FBData.webAddress());

KAboutData::setApplicationData(about);

// if(MauiManUtils::isMauiSession())
Expand Down
2 changes: 1 addition & 1 deletion src/qml/CaskScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ WaylandOutput
sizeFollowsWindow: true
availableGeometry : _cask.availableGeometry

scaleFactor: Cask.MauiMan.screen.scaleFactor
// scaleFactor: Cask.MauiMan.screen.scaleFactor
// transform: switch(control.orientation)
// {
// case Qt.PrimaryOrientation: return WaylandOutput.TransformNormal
Expand Down
6 changes: 3 additions & 3 deletions src/qml/shell/statusbar/items/calendar/CalendarItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.maui.cask as Cask

import "../../../templates" as Templates

// import org.mauikit.calendar 1.0 as Cal
import org.mauikit.calendar as Cal

Cask.PanelItem
{
Expand Down Expand Up @@ -71,7 +71,7 @@ Cask.PanelItem

width: parent.width
height: currentItem.implicitHeight
/*

initialItem: Cal.DaysGrid
{
id: _monthGrid
Expand All @@ -93,7 +93,7 @@ Cask.PanelItem
onClicked: _stack.push(_tasksPageComponent)
}
}
}*/
}

}
}
Expand Down
16 changes: 9 additions & 7 deletions src/qml/shell/statusbar/items/sliders/volume/DeviceItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import QtQuick.Layouts

import org.mauikit.controls as Maui

import org.maui.cask as Cask
import org.mauicore.audio as MauiCore

import ".."
Expand All @@ -14,25 +13,28 @@ import "../../../../templates" as Template
Template.SliderToggle
{
id: control

property string /* "sink" | "sink-input" | "source" | "source-output" */ type

readonly property var currentPort: model.Ports[model.ActivePortIndex]
readonly property bool muted: model.Muted
readonly property int activePortIndex: model.ActivePortIndex
readonly property int percent: (control.volume * 100) / MauiCore.PulseAudio.NormalVolume
readonly property int percent: (control.volume * 100) / MauiCore.PulseAudio.NormalVolume
readonly property bool isPlayback: type.startsWith("sink")
slider.iconSource: "audio-volume-high"

property int volume: model.Volume
readonly property int volume: model.Volume
property bool ignoreValueChange: true

slider.from: MauiCore.PulseAudio.MinimalVolume
slider.to: MauiCore.PulseAudio.MaximalVolume
slider.stepSize: slider.to / (slider.to / MauiCore.PulseAudio.NormalVolume * 100.0)
visible: model.HasVolume
enabled: model.VolumeWritable
slider.iconSource: "audio-volume-high"

slider.opacity: model.Muted ? 0.5 : 1
//slider.value: 0.5
slider.animatedRec.width: (slider.handle.x * meter.volume) + Maui.Style.space.medium

visible: model.HasVolume
enabled: model.VolumeWritable

data: [MauiCore.VolumeMonitor
{
Expand Down
2 changes: 0 additions & 2 deletions src/qml/shell/templates/SliderTemplate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import QtQuick.Controls

import org.mauikit.controls as Maui

import org.maui.cask as Cask

import Qt5Compat.GraphicalEffects

Slider
Expand Down
2 changes: 1 addition & 1 deletion src/qml/shell/templates/SliderToggle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import QtQuick.Layouts
AbstractBarToggle
{
id: control
property alias slider : _slider
readonly property alias slider : _slider

bar: SliderTemplate
{
Expand Down
2 changes: 1 addition & 1 deletion startcask/cask-session/startup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void AutoStartAppsJob::start()
{
qCDebug(CASK_SESSION);

QTimer::singleShot(0, this, [=]() {
QTimer::singleShot(0, this, [this]() {
do {
QString serviceName = m_autoStart.startService();
if (serviceName.isEmpty()) {
Expand Down

0 comments on commit 8272456

Please sign in to comment.