From d657a65fcb50edc9ffbcb14ab6b2815cc732709d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 29 Apr 2018 14:21:08 +0200 Subject: Use new odhtdb with more robust ntp --- src/ChannelTopPanel.cpp | 2 +- src/MessageBoard.cpp | 2 ++ src/main.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChannelTopPanel.cpp b/src/ChannelTopPanel.cpp index 8d9b0c8..d597353 100644 --- a/src/ChannelTopPanel.cpp +++ b/src/ChannelTopPanel.cpp @@ -71,6 +71,6 @@ namespace dchat float ChannelTopPanel::getHeight() { float fontSize = FONT_SIZE * Settings::getScaling(); - return floor(ResourceCache::getFont("fonts/Roboto-Regular.ttf")->getLineSpacing(fontSize) + PADDING_TOP + PADDING_BOTTOM); + return floor(ResourceCache::getFont("fonts/Roboto-Regular.ttf")->getLineSpacing(fontSize) + PADDING_TOP + PADDING_BOTTOM + BOTTOM_LINE_HEIGHT); } } diff --git a/src/MessageBoard.cpp b/src/MessageBoard.cpp index a2b9284..cd73c6d 100644 --- a/src/MessageBoard.cpp +++ b/src/MessageBoard.cpp @@ -184,6 +184,8 @@ namespace dchat if(position.y + LINE_HEIGHT > 0.0f && position.y < backgroundPos.y + backgroundSize.y) drawGradientLine(sf::Vector2f(position.x + LINE_SIDE_PADDING, floor(position.y)), sf::Vector2f(backgroundSizeWithoutPadding.x - LINE_SIDE_PADDING * 2.0f, LINE_HEIGHT), LINE_COLOR, window); + + position.y += LINE_HEIGHT; } totalHeight = (position.y - scroll) - startHeight; } diff --git a/src/main.cpp b/src/main.cpp index dff2328..68f9ac0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -48,6 +48,7 @@ odhtdb::DatabaseNode createDatabaseNodeFromJoinKey(const string &joinKey) void channelAddStoredMessages(Channel *channel, const odhtdb::DatabaseStorageObjectList *nodeStorage) { + printf("Load %u messages in channel %s\n", nodeStorage->objects.size(), channel->getName().c_str()); for(auto nodeStorageAddedObject : nodeStorage->objects) { if(nodeStorageAddedObject->decryptedObject.operation == odhtdb::DatabaseOperation::ADD_DATA) -- cgit v1.2.3