Navigation Menu

Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Expanded code-blocks overlap with previous code #15549

Closed
1 task done
StuntHacks opened this issue Sep 5, 2017 · 4 comments
Closed
1 task done

Expanded code-blocks overlap with previous code #15549

StuntHacks opened this issue Sep 5, 2017 · 4 comments

Comments

@StuntHacks
Copy link

StuntHacks commented Sep 5, 2017

Prerequisites

Description

When expanding a collapsed code-block while the current viewport isn't scrollable (i.e. all code that is shown fits on the screen), the expanded code overlaps with the code right among it (See screenshot). Only re-opening the file helps.

Reproduces how often: Every time on the code I discovered it, never on some simple, short code.

Versions

Atom : 1.19.3
Electron: 1.6.9
Chrome : 56.0.2924.87
Node : 7.4.0

Screenshot

atomcollapsebug

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Sep 5, 2017

Every time on the code I discovered it, never on some simple, short code.

Can you share that code to help us reproduce?

@StuntHacks
Copy link
Author

For some reason, I'm not able to re-create it now.

However, here is the full file in which I experienced the problem:

#pragma once
#include "includes.h"
#include "drawing.h"
#include "./style.h"
#include "./notification.h"
// #include "./menuEntry.h"

class Menu {
private:
	std::vector<menuEntry_s*> m_entries;
	// std::vector<MenuEntry> m_menuEntries;
	unsigned int m_selected, m_frameCounter, m_batteryIconState;
	bool m_entryLaunched, m_batteryIconShown;

	sf2d_texture 	*m_buttonLaunchTex,
								*m_buttonLaunchPushedTex,
								*m_buttonSettingsTex,
								*m_buttonSettingsPushedTex;

	std::vector<sf2d_texture*> m_batteryIcons, m_wifiIcons;

	Text *m_settingsText, *m_launchText, *m_timeText;
	Notification m_not;

	// touch control
	bool m_settingsButtonTouched, m_launchButtonTouched, m_menuEntryTouched;
	unsigned int m_touchedEntry;

public:
	Menu();
	virtual ~Menu();

	void pushEntry(menuEntry_s* t_me) { this->m_entries.push_back(t_me); };
	void loadEntries(std::string t_path = "sdmc:/3ds");

	std::vector<menuEntry_s*> getEntries() { return this->m_entries; };
	unsigned int getEntryAmount() { return this->m_entries.size(); };
	unsigned int getSelected() { return this->m_selected; };
	menuEntry_s* getSelectedEntry() { return this->m_entries[this->m_selected]; };
	bool entryLaunched() { return this->m_entryLaunched; };

	// TODO: move these two to menu.cpp and clean them up
	inline bool touchInAbsoluteBox(int t_x, int t_y, int t_x2, int t_y2, int t_type = 0) {
		touchPosition touch;
		hidTouchRead(&touch);

		u32 keyState;

		if(t_type == 0) {
			keyState = hidKeysHeld();
		} else if(t_type == 1) {
			keyState = hidKeysDown();
		} else {
			keyState = hidKeysUp();
		}

		return	keyState & KEY_TOUCH
						&& touch.px >= t_x
						&& touch.py >= t_y
						&& touch.px <= t_x2
						&& touch.py <= t_y2;
	}
	inline bool touchInRelativeBox(int t_x, int t_y, int t_w, int t_h, int t_type = 0) {
		touchPosition touch;
		hidTouchRead(&touch);

		u32 keyState;

		if(t_type == 0) {
			keyState = hidKeysHeld();
		} else if(t_type == 1) {
			keyState = hidKeysDown();
		} else {
			keyState = hidKeysUp();
		}

		return	keyState & KEY_TOUCH
						&& touch.px >= t_x
						&& touch.py >= t_y
						&& touch.px <= t_x + t_w
						&& touch.py <= t_y + t_h;
	}

	void drawTop();
	void drawBottom();
	void draw();
	void update();
};

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Oct 2, 2017

I can reproduce this /cc: #15761 (comment)

@lock
Copy link

lock bot commented Apr 1, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked and limited conversation to collaborators Apr 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants